Mesa (master): glx: move declarations before code

Brian Paul brianp at kemper.freedesktop.org
Tue Aug 9 08:04:40 PDT 2011


Module: Mesa
Branch: master
Commit: e0496b63ff0d41a36812b78e9062e92590fcdd55
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e0496b63ff0d41a36812b78e9062e92590fcdd55

Author: Brian Paul <brianp at vmware.com>
Date:   Tue Aug  9 08:58:20 2011 -0600

glx: move declarations before code

---

 src/glx/dri2_glx.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index 80e4da3..d9524d7 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -455,16 +455,20 @@ dri2_wait_gl(struct glx_context *gc)
 static void
 dri2FlushFrontBuffer(__DRIdrawable *driDrawable, void *loaderPrivate)
 {
+   struct glx_display *priv;
+   struct dri2_display *pdp;
+   struct glx_context *gc;
    struct dri2_drawable *pdraw = loaderPrivate;
+
    if (!pdraw)
       return;
 
    if (!pdraw->base.psc)
       return;
 
-   struct glx_display *priv = __glXInitialize(pdraw->base.psc->dpy);
-   struct dri2_display *pdp = (struct dri2_display *)priv->dri2Display;
-   struct glx_context *gc = __glXGetCurrentContext();
+   priv = __glXInitialize(pdraw->base.psc->dpy);
+   pdp = (struct dri2_display *) priv->dri2Display;
+   gc = __glXGetCurrentContext();
 
    /* Old servers don't send invalidate events */
    if (!pdp->invalidateAvailable)



More information about the mesa-commit mailing list