summaryrefslogtreecommitdiff
path: root/src/glx
diff options
context:
space:
mode:
authorRALOVICH, Kristóf <tade60@freemail.hu>2008-10-11 12:56:32 +0200
committerAlan Hourihane <alanh@tungstengraphics.com>2008-10-15 11:17:45 +0100
commitb4bb29cecd1dcee1f92d77bd462069fda71fe039 (patch)
treedfef8b8169e1140eb708d0d5d8cbe434b3870493 /src/glx
parentb3cb405252ebb009119e5d464aa6e7cd4d845705 (diff)
glx: make INIT_MESA_SPARC more robust
Embed the macro body into do { ... } while(0) .
Diffstat (limited to 'src/glx')
-rw-r--r--src/glx/x11/glxext.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/glx/x11/glxext.c b/src/glx/x11/glxext.c
index eaf1ec2dfd..20c6bfd3af 100644
--- a/src/glx/x11/glxext.c
+++ b/src/glx/x11/glxext.c
@@ -59,14 +59,14 @@ void __glXDumpDrawBuffer(__GLXcontext *ctx);
#ifdef USE_SPARC_ASM
static void _glx_mesa_init_sparc_glapi_relocs(void);
static int _mesa_sparc_needs_init = 1;
-#define INIT_MESA_SPARC { \
- if(_mesa_sparc_needs_init) { \
+#define INIT_MESA_SPARC do { \
+ if (_mesa_sparc_needs_init) { \
_glx_mesa_init_sparc_glapi_relocs(); \
- _mesa_sparc_needs_init = 0; \
- } \
-}
+ _mesa_sparc_needs_init = 0; \
+ } \
+ } while(0)
#else
-#define INIT_MESA_SPARC
+#define INIT_MESA_SPARC do { } while(0)
#endif
/*
@@ -645,7 +645,7 @@ _X_HIDDEN __GLXdisplayPrivate *__glXInitialize(Display* dpy)
}
#endif
- INIT_MESA_SPARC
+ INIT_MESA_SPARC;
/* The one and only long long lock */
__glXLock();
@@ -759,7 +759,7 @@ _X_HIDDEN CARD8 __glXSetupForCommand(Display *dpy)
if (gc->currentDpy == dpy) {
/* Use opcode from gc because its right */
- INIT_MESA_SPARC
+ INIT_MESA_SPARC;
return gc->majorOpcode;
} else {
/*