Adam Jackson <[email protected]> writes: > No functional change, just a little easier to read and harder to get > wrong. > > Signed-off-by: Adam Jackson <[email protected]> > --- > glx/glxcmds.c | 38 +++++++++++++++----------------------- > 1 file changed, 15 insertions(+), 23 deletions(-) > > diff --git a/glx/glxcmds.c b/glx/glxcmds.c > index 6eb3541..65d0739 100644 > --- a/glx/glxcmds.c > +++ b/glx/glxcmds.c > @@ -1945,31 +1945,23 @@ DoGetDrawableAttributes(__GLXclientState * cl, XID > drawId) > if (pGlxDraw) > pDraw = pGlxDraw->pDraw; > > - attributes[2*num] = GLX_Y_INVERTED_EXT; > - attributes[2*num+1] = GL_FALSE; > - num++; > - attributes[2*num] = GLX_WIDTH; > - attributes[2*num+1] = pDraw->width; > - num++; > - attributes[2*num] = GLX_HEIGHT; > - attributes[2*num+1] = pDraw->height; > - num++; > +#define ATTRIB(a, v) { \ > + attributes[2*num] = (a); \ > + attributes[2*num+1] = (v); \ > + num++; \ > + }
I think some compilers/static checkers will whine unless this is a do {
... } while (0) macro, becauuse of the "stray" semicolons we end up with
otherwise. With that changed,
Reviewed-by: Eric Anholt <[email protected]>
signature.asc
Description: PGP signature
_______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
