On Wed, Apr 8, 2015 at 12:25 PM, Andy Goth <andrew.m.g...@gmail.com> wrote:

> I hesitated to do much more than move existing code around since I don't
> know how strong the stylistic preferences are.  For example, one thing I
> wanted to do was treat pointers as booleans, e.g. "if(pointer)" rather than
> "if(pointer!=0)",


FWIW, the coding rules I work under require us to write "if(pointer!=NULL)"
because the invalid pointer is a compiler-dependent value.

I've actually used a compiler where NULL was not 0. Instead it was
0xFFFFFFFF. Presumably this was partially because this the address of the
last byte of the reset vector (as well as being the highest addressable
byte) and because the erased/unwritten value of a byte of Flash ROM is
0xFF. (At for every Flash ROM device I've ever (directly) used.)
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to