holotko wrote: > > > But for testing null pointers, I use `!'. In this context, it seems > > > > BAD. I worked in envinronments where NULL is ((void *)-1UL). If you use ! > > to check for a NULL pointer you make your code not portable. > > What is the best, all round "most portable" means of testing for a null > pointer?? Using `!p' is sufficient. If you use `p != NULL', you need to include stdio.h to ensure that NULL is defined, which is kind of overkill if you're not using anything else from stdio.h. -- Glynn Clements <[EMAIL PROTECTED]>
- Re: Hey, could someone critique... Pete Ryland
- Re: Hey, could someone critique... Andrea Arcangeli
- Re: Hey, could someone critique... Pete Ryland
- what if I redefine NULL to (voi... Andrea Arcangeli
- Re: what if I redefine NULL to ... Glynn Clements
- Re: what if I redefine NULL to ... Andrea Arcangeli
- Re: what if I redefine NULL to ... Glynn Clements
- Re: what if I redefine NULL to ... Pete Ryland
- Re: Hey, could someone critique... Andrea Arcangeli
- Re: Hey, could someone critique... holotko
- Re: Hey, could someone critique... Glynn Clements
- Re: Hey, could someone critique a little... Andrea Arcangeli
- Re: Hey, could someone critique a little app I did? R. Brock Lynn
- Re: Hey, could someone critique a little app I did? R. Brock Lynn
- Re: Hey, could someone critique a little app I did? Andrea Arcangeli
- Re: Hey, could someone critique a little app I did? R. Brock Lynn
- Re: Hey, could someone critique a little app I did? Henrik Nordstrom