Mesa (master): egl: drop memset(0) of calloc'ed memory

Eric Engeström eric_engestrom at kemper.freedesktop.org
Thu Oct 12 13:45:05 UTC 2017


Module: Mesa
Branch: master
Commit: 4a6c7e8ad84263291f0fe3df2a6f4ddc8cced773
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=4a6c7e8ad84263291f0fe3df2a6f4ddc8cced773

Author: Eric Engestrom <eric at engestrom.ch>
Date:   Mon Sep 25 22:39:24 2017 +0100

egl: drop memset(0) of calloc'ed memory

`_EGLDriver *drv` is a freshly calloc()'ed object, memset(0)'ing some of
it is a no-op.

Signed-off-by: Eric Engestrom <eric at engestrom.ch>
Reviewed-by: Emil Velikov <emil.velikov at collabora.com>

---

 src/egl/main/eglfallbacks.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/egl/main/eglfallbacks.c b/src/egl/main/eglfallbacks.c
index 1575ab5f79..2d4851f757 100644
--- a/src/egl/main/eglfallbacks.c
+++ b/src/egl/main/eglfallbacks.c
@@ -49,8 +49,6 @@ _eglReturnFalse(void)
 void
 _eglInitDriverFallbacks(_EGLDriver *drv)
 {
-   memset(&drv->API, 0, sizeof(drv->API));
-
    /* the driver has to implement these */
    drv->API.Initialize = NULL;
    drv->API.Terminate = NULL;




More information about the mesa-commit mailing list