On Wed, Mar 02, 2011 at 01:41:25PM +0200, Pauli Nieminen wrote:
> On 02/03/11 11:37 +0000, ext Daniel Stone wrote:
> > On Wed, Feb 23, 2011 at 07:01:04PM +0200, Pauli wrote:
> > > diff --git a/hw/xfree86/dri2/dri2ext.c b/hw/xfree86/dri2/dri2ext.c
> > > index 4e48e65..725823e 100644
> > > --- a/hw/xfree86/dri2/dri2ext.c
> > > +++ b/hw/xfree86/dri2/dri2ext.c
> > > @@ -227,11 +227,15 @@ send_buffers_reply(ClientPtr client, DrawablePtr
> > > pDrawable,
> > > }
> > >
> > > rep.type = X_Reply;
> > > + rep.pad1 = 0;
> > > rep.length = (count - skip) * sizeof(xDRI2Buffer) / 4;
> > > rep.sequenceNumber = client->sequence;
> > > rep.width = width;
> > > rep.height = height;
> > > rep.count = count - skip;
> > > + rep.pad2 = 0;
> > > + rep.pad3 = 0;
> > > + rep.pad4 = 0;
> > > WriteToClient(client, sizeof(xDRI2GetBuffersReply), &rep);
> > >
> > > for (i = 0; i < count; i++) {
> >
> > Why not just memset(&rep, 0, sizeof(rep)) before you start filling it
> > in?
>
> I tough using C99 named initializer but then I remembered opposition against
> using 11 years old standard features. But I guess memset would be option too.memset is pretty much the standard way to do it, and is the most future-proof, etc. Cheers, Daniel
signature.asc
Description: Digital signature
_______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
