Re: patch for GtkDialog

--- Joel Becker <jlbec evilplan org> wrote:
> On Fri, Mar 29, 2002 at 04:22:23PM -0800, Charles
> Lambert wrote:
> > your test should be:
> > if ( (NULL == rd) && (rd->response_id ==
> > 
> > NULL isn't guarenteed to be equal to zero
> > (and yes i know i'm a perenthesis freak)
> 	"if (rd)" is often considered to be idiomatic.  In
> addition,
> 0 is defined as the represention of the NULL
> pointer.  ANSI C
> specifically defines NULL as 0 or ((void *)0) or

the standard states that if ax is a pointer then (ax
!= 0) will convert zero to NULL

a direct quote from the ansi c99 standard states :

which expands to an implementaion-defined null pointer

you cannot gaurentee that the complier will _always_
use the zero memory address in all instances becuase
iirc NULL is dictated by the operating system not the
compiler. and gnome does run on multiple operating
systems already.

i know that you, me or any other developer doesn't
want to have to hunt down this bug when some compiler
or OS decides to use some other value for NULL.

Do You Yahoo!?
Yahoo! Greetings - send holiday greetings for Easter, Passover

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]