httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From (Robert S. Thau)
Subject Re: I *don't* want Paul's style guide.
Date Tue, 02 Jul 1996 14:59:48 GMT
  As I understand C,
  char *p;

   if (!p) ...

  is equivalent to

   if (!(int)p) ...

You understand C incorrectly.  The result of "!p" is defined to be
precisely the same as the result of "p != 0", if p has pointer or
integral type, and to be undefined othrewise.  If p has pointer type,
this is precisely equivalent to a comparison against NULL.  (Yes, I
looked it up).


View raw message