aboutsummaryrefslogtreecommitdiffhomepage
path: root/fish_pager.c
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2007-01-09 09:03:38 +1000
committerGravatar axel <axel@liljencrantz.se>2007-01-09 09:03:38 +1000
commitbc2c37c739e3747bc705eae0b6c9a0323afb6f82 (patch)
treef464be13b36493c464be3f741892d9812439f308 /fish_pager.c
parent4a2a47666f1e3a92646284b4c921cd47b8e8c5b1 (diff)
Fix accidentally triggering of error condition when nothing bad happened in fish pager init code
darcs-hash:20070108230338-ac50b-c4d0a44ee06660acf107388f1c889296a535494b.gz
Diffstat (limited to 'fish_pager.c')
-rw-r--r--fish_pager.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fish_pager.c b/fish_pager.c
index 13720f17..d5006d7a 100644
--- a/fish_pager.c
+++ b/fish_pager.c
@@ -1175,7 +1175,10 @@ static void read_array( FILE* file, array_list_t *comp )
static int get_fd( const char *str )
{
char *end;
- long fd = strtol( str, &end, 10 );
+ long fd;
+
+ errno = 0;
+ fd = strtol( str, &end, 10 );
if( fd < 0 || *end || errno )
{
debug( 0, ERR_NOT_FD, program_name, optarg );