Re: [Dri-devel] Re: I have a bugfix to the xc/lib/GL/mesa/src/drv/r128/r128_tex.c

2001-06-08 Thread Mike A. Harris
On Fri, 8 Jun 2001, Andrew James Richardson wrote: >> The original says "if a and b then c", while yours says: >> >> "if a and b then c" >> >> Your multiple if block is syntactically equivalent to >> >> if ( !image && !image->Data) >> >> Notice the flipping of || to && from the original example.

Re: [Dri-devel] Re: I have a bugfix to the xc/lib/GL/mesa/src/drv/r128/r128_tex.c

2001-06-08 Thread Andrew James Richardson
On Fri, 8 Jun 2001, Mike A. Harris wrote: > On Fri, 8 Jun 2001, Andrew James Richardson wrote: > > >> > >> > --- > >> > >if ( !image || !image->Data) > >> > > > > >Brian, > > > > I thought that in the C specs you can't be guarenteed the order of > >evaluation in an if

[Dri-devel] Re: I have a bugfix to the xc/lib/GL/mesa/src/drv/r128/r128_tex.c

2001-06-08 Thread Mike A. Harris
On Fri, 8 Jun 2001, Joaquin Cuenca Abela wrote: >> You're right here. But as as long as you only READ >> it should make no >> difference (IMHO)... > >if it's right, it makes a big difference. If you try: > >if (!image->Data || !image) > >the program will segfault trying to access the member >Dat

[Dri-devel] Re: I have a bugfix to the xc/lib/GL/mesa/src/drv/r128/r128_tex.c

2001-06-08 Thread Mike A. Harris
On Fri, 8 Jun 2001, Andrew James Richardson wrote: >> > > > --- >> > >if ( !image || !image->Data) >> > > >Brian, > > I thought that in the C specs you can't be guarenteed the order of >evaluation in an if brace. Surely a safer bet is > > if(!image){ >