Ethereal-dev: [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: Craig Rodrigues <rodrigc@xxxxxxxxxxxx>
Date: Thu, 18 Nov 1999 00:53:13 -0500
Hi,

I am having some problems compiling toshiba.c:
==========================================================================
      152 |                 if (fgets(buf, 240, wth->fh) >= 0) {
            .............................................a......
a - 1506-068 (S) Operation between types "char*" and "int" is not allowed.


      266 |         if (fgets(line, 240, fh) < 0) {
            .................................a.....
a - 1506-068 (S) Operation between types "char*" and "int" is not allowed.


      287 |         if (fgets(line, 240, fh) < 0) {
            .................................a.....
a - 1506-068 (S) Operation between types "char*" and "int" is not allowed.


      337 |                 if (fgets(line, 240, fh) < 0) {
            .........................................a.....
a - 1506-068 (S) Operation between types "char*" and "int" is not allowed. 
==========================================================================

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.
-- 
Craig Rodrigues        
http://www.gis.net/~craigr    
rodrigc@xxxxxxxxxxxx