Invalid Pointers
Doug Gwyn
gwyn at smoke.BRL.MIL
Wed Jul 19 15:40:29 AEST 1989
In article <8990 at chinet.chi.il.us> les at chinet.chi.il.us (Leslie Mikesell) writes:
-In article <10541 at smoke.BRL.MIL> gwyn at brl.arpa (Doug Gwyn) writes:
->>#define NO_FOOBAR ((struct foobar *) -1 ) is what I use, but...
->This is not portable. Just use NULL.
-Do you mean that there are machines that might return a valid -1 from
-sbrk(2) or shmat(2), or that would misconstrue the comparsion of
-a pointer to -1?
What I mean is what I said.
-Yes, I know these are botches, but are they not always accomodated?
No. Non-UNIX systems need not even try to accommodate them.
More information about the Comp.lang.c
mailing list