[Mesa-dev] [PATCH v2 2/3] st/xorg: remove superfluous memset

Lucas Stach dev at lynxeye.de
Wed Jul 18 07:07:28 PDT 2012


exaDriverAlloc() uses calloc, which already initialises pExa to zero.

Signed-off-by: Lucas Stach <dev at lynxeye.de>
---
 src/gallium/state_trackers/xorg/xorg_exa.c |    2 --
 1 Datei geändert, 2 Zeilen entfernt(-)

diff --git a/src/gallium/state_trackers/xorg/xorg_exa.c b/src/gallium/state_trackers/xorg/xorg_exa.c
index c8c57ff..11985c5 100644
--- a/src/gallium/state_trackers/xorg/xorg_exa.c
+++ b/src/gallium/state_trackers/xorg/xorg_exa.c
@@ -1001,8 +1001,6 @@ xorg_exa_init(ScrnInfoPtr pScrn, Bool accel)
       goto out_err;
    }
 
-   memset(pExa, 0, sizeof(*pExa));
-
    pExa->exa_major         = 2;
    pExa->exa_minor         = 2;
    pExa->memoryBase        = 0;
-- 
1.7.10.4



More information about the mesa-dev mailing list