[Mesa-dev] [PATCH 7/9] Remove useless memset after calloc

Matt Turner mattst88 at gmail.com
Tue Sep 4 23:42:48 PDT 2012


---
 src/glx/dri_glx.c   |    1 -
 src/glx/drisw_glx.c |    1 -
 2 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/src/glx/dri_glx.c b/src/glx/dri_glx.c
index 3a727e5..03237d4 100644
--- a/src/glx/dri_glx.c
+++ b/src/glx/dri_glx.c
@@ -850,7 +850,6 @@ driCreateScreen(int screen, struct glx_display *priv)
    if (psc == NULL)
       return NULL;
 
-   memset(psc, 0, sizeof *psc);
    if (!glx_screen_init(&psc->base, screen, priv)) {
       free(psc);
       return NULL;
diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c
index 920a9ab..014296b 100644
--- a/src/glx/drisw_glx.c
+++ b/src/glx/drisw_glx.c
@@ -636,7 +636,6 @@ driswCreateScreen(int screen, struct glx_display *priv)
    if (psc == NULL)
       return NULL;
 
-   memset(psc, 0, sizeof *psc);
    if (!glx_screen_init(&psc->base, screen, priv)) {
       free(psc);
       return NULL;
-- 
1.7.8.6



More information about the mesa-dev mailing list