[Bug 1983] cpukit/libnetworking/libc/gethostbyht.c:226:12: warning: ordered comparison of pointer with integer zero

bugzilla-daemon at rtems.org bugzilla-daemon at rtems.org
Wed Dec 7 06:42:36 UTC 2011


https://www.rtems.org/bugzilla/show_bug.cgi?id=1983

--- Comment #2 from Ralf Corsepius <ralf.corsepius at rtems.org> 2011-12-07 00:42:35 CST ---
OK, I'll apply the following patch to HEAD, 4.10 and 4.9.

--- a/cpukit/libnetworking/libc/gethostbyht.c
+++ b/cpukit/libnetworking/libc/gethostbyht.c
@@ -223,7 +223,7 @@ struct hostent* gethostent_r(char* buf, int len)
   int    curlen;


-  if (hostf<0) return 0;
+  if (!hostf) return 0;
   fseek(hostf,0,SEEK_END);
   curlen=ftell(hostf);
   fseek(hostf,0,SEEK_SET);

-- 
Configure bugmail: https://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the bugs mailing list