[Mesa-stable] [PATCH 2/2] egl: move memcpy to bring conf->base operations together

Varad Gautam varadgautam at gmail.com
Tue Oct 6 21:18:15 PDT 2015


Signed-off-by: Varad Gautam <varadgautam at gmail.com>
---
 src/egl/drivers/dri2/egl_dri2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index aff2181..f600d1b 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -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;
 
-- 
2.4.6



More information about the mesa-stable mailing list