mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
Fix accidentally triggering of error condition when nothing bad happened in fish pager init code
darcs-hash:20070108230338-ac50b-c4d0a44ee06660acf107388f1c889296a535494b.gz
This commit is contained in:
parent
4a2a47666f
commit
bc2c37c739
1 changed files with 4 additions and 1 deletions
|
@ -1175,7 +1175,10 @@ static void read_array( FILE* file, array_list_t *comp )
|
||||||
static int get_fd( const char *str )
|
static int get_fd( const char *str )
|
||||||
{
|
{
|
||||||
char *end;
|
char *end;
|
||||||
long fd = strtol( str, &end, 10 );
|
long fd;
|
||||||
|
|
||||||
|
errno = 0;
|
||||||
|
fd = strtol( str, &end, 10 );
|
||||||
if( fd < 0 || *end || errno )
|
if( fd < 0 || *end || errno )
|
||||||
{
|
{
|
||||||
debug( 0, ERR_NOT_FD, program_name, optarg );
|
debug( 0, ERR_NOT_FD, program_name, optarg );
|
||||||
|
|
Loading…
Reference in a new issue