Ethereal-dev: Re: [ethereal-dev] Problem with toshiba.c

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Gilbert Ramirez <gram@xxxxxxxxxx>
Date: Thu, 18 Nov 1999 00:45:43 -0600
On Thu, Nov 18, 1999 at 12:27:52AM -0600, Guy Harris wrote:
> 
> 
> > fgets() returns a char*, which is either a pointer to a string, or NULL
> > on error.  I don't understand why the return value is being compared
> > to 0.
> 
> It should be compared with NULL - those are calls to "file_gets()",
> which is a macro that expands to "gzgets()" if you have "zlib", and
> "fgets()" if you don't, and both of those return NULL on error and
> non-NULL on success.

I have no idea what I was thinking when I wrote that code. Was _that_ me? 
A fix is on its way.

--gilbert