pipe-loader: don't mix code and variable declarations
authorEmil Velikov <emil.l.velikov@gmail.com>
Wed, 14 Oct 2015 17:11:11 +0000 (18:11 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Sat, 21 Nov 2015 12:52:20 +0000 (12:52 +0000)
We cannot use this C99 feature here quite yet, as the code needs to be
build with MSVC prior to 2013.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Rob Clark <robclark@freedesktop.org>
src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c

index e7804d34e79da61f6bfe0d32bd8325c901035f12..b5dfc56f49d98924b4271519514775da315faefc 100644 (file)
@@ -238,8 +238,9 @@ pipe_loader_drm_probe(struct pipe_loader_device **devs, int ndev)
 
    for (i = DRM_RENDER_NODE_MIN_MINOR, j = 0;
         i <= DRM_RENDER_NODE_MAX_MINOR; i++) {
-      fd = open_drm_render_node_minor(i);
       struct pipe_loader_device *dev;
+
+      fd = open_drm_render_node_minor(i);
       if (fd < 0)
          continue;