httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Bley <>
Subject Re: [PATCH] Error logging in http_core.c: extra info, fseek()
Date Sun, 07 Mar 1999 18:58:31 GMT
On Sun, 7 Mar 1999, Roy T. Fielding wrote:

> >+		    if (fseek(f, offset, SEEK_SET))
> I'm all for adding more error detection stuff, but the comparison should be
>    if (fseek(f, offset, SEEK_SET) == -1)
> since that is more reliable across platforms than a return of only zero
> on success.  The same is true of other system calls (look at the man page
> to see what is defined as "RETURN VALUES").

Hmmm.. you learn something new everyday.  So "-1 for error" is more 
portable than "non-zero for error"?  OK, I'll make sure to follow that 
pattern.  Should I then assume that existing code which makes this 
same mistake should be corrected?

John Bley -
Duke '99 - English/Computer Science
  Since English is a mess, it maps well onto the problem space,
  which is also a mess, which we call reality.     - Larry Wall

View raw message