pointers, tests, casts

Jim Reid jwr at scotty.UUCP
Sat Dec 3 05:39:00 AEST 1988


In article danw at tekchips.CRL.TEK.COM (Daniel E. Wilson) writes:
>
>  I tend to avoid the whole problem by defining a simple macro.  Simply
>by using this macro always I get a NULL pointer of the needed type.
>This does avoid bugs.
>
>     #define NIL(type) ((type *) NULL)

If you were the person who originally posted this macro a couple of years ago,
I'd personally like to thank you for it.

I've been using it in my code ever since.
I haven't come across a better all-purpose pointer type.

-- 

Jim Reid		{ames,harvard,rutgers}!rochester!kodak!scotty!jwr

--



More information about the Comp.lang.c mailing list