* Ian Romanick <[email protected]>: > On 04/02/2011 11:17 AM, Nicolas Kaiser wrote: > > diff --git a/src/mga_dri.c b/src/mga_dri.c > > index 2723dd8..8b1d751 100644 > > --- a/src/mga_dri.c > > +++ b/src/mga_dri.c > > @@ -92,24 +92,24 @@ static Bool MGAInitVisualConfigs( ScreenPtr pScreen ) > > case 16: > > numConfigs = 8; > > > > - pConfigs = (__GLXvisualConfig*)xcalloc( sizeof(__GLXvisualConfig), > > + pConfigs = (__GLXvisualConfig*)calloc( 1, sizeof(__GLXvisualConfig) * > > numConfigs ); > > Why? I think the correct thing is the switch numConfigs and sizeof(...) > in all these cases. Calling calloc like that is just silly.
That's the way I saw the wrapper do it in /usr/include/xorg/os.h: #define xcalloc(_num, _size) Xcalloc((unsigned long)(_num)*(unsigned long)(_size)) Sorry, I'll resend a fixed patch. Best regards, Nicolas Kaiser _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
