egl: move memcpy to bring conf->base operations together
authorVarad Gautam <varadgautam@gmail.com>
Wed, 7 Oct 2015 04:18:15 +0000 (09:48 +0530)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 7 Oct 2015 14:05:28 +0000 (15:05 +0100)
Signed-off-by: Varad Gautam <varadgautam@gmail.com>
Suggested-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
src/egl/drivers/dri2/egl_dri2.c

index aff21814be56cc9f3b3d682c7fa4e5b5e193d420..f600d1b606d0d1c151549b701df0b2b3c7912811 100644 (file)
@@ -301,7 +301,6 @@ dri2_add_config(_EGLDisplay *disp, const __DRIconfig *dri_config, int id,
       if (conf == NULL)
          return NULL;
 
-      memcpy(&conf->base, &base, sizeof base);
       if (double_buffer) {
          if (srgb)
             conf->dri_srgb_double_config = dri_config;
@@ -314,6 +313,7 @@ dri2_add_config(_EGLDisplay *disp, const __DRIconfig *dri_config, int id,
             conf->dri_single_config = dri_config;
       }
 
+      memcpy(&conf->base, &base, sizeof base);
       conf->base.SurfaceType = 0;
       conf->base.ConfigID = config_id;