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: Guy Harris <gharris@xxxxxxxxxxxx>
Date: Wed, 17 Nov 1999 22:24:41 -0800
> 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.