Invalid Pointers
Doug Gwyn
gwyn at smoke.BRL.MIL
Tue Jul 18 01:08:13 AEST 1989
In article <4348 at eos.UUCP> jbm at eos.UUCP (Jeffrey Mulligan) writes:
-It has been pointed out that there should be no assumptions
-about what addresses are valid; is there any way to get
-a guaranteed INVALID address?
A null pointer is guaranteed not to match any valid object address.
-#define NO_FOOBAR ((struct foobar *) -1 ) is what I use, but...
This is not portable. Just use NULL.
More information about the Comp.unix.wizards
mailing list