Ethereal-dev: Re: [ethereal-dev] Patches containing assert statements (& not much else)

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <guy@xxxxxxxxxx>
Date: Wed, 19 Apr 2000 15:02:20 -0700 (PDT)
> >Why initialize them to a value with all bits set?  NULL is the right
> >value to use here - it's the official "distinguished value" for pointers
> >in C and C++.
> 
> In preference to initialising them to an indeterminate bit pattern! I use
> 0 to indicate that pointer has been used and freed. I thought that I was
> following the model in the developer document

If the developer document suggests using -1 for *pointers*, it is in
error, and should be fixed.

If it only suggests using it for integral values, the equivalent notion
for pointers is a null pointer.