diff options
author | Adam Jackson <ajax@redhat.com> | 2008-10-06 15:36:51 -0400 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2008-10-06 15:36:51 -0400 |
commit | 8a5b89e8e184f4cbf33c6dee0b06e61d8f857576 (patch) | |
tree | b042833775d237a3971eae7a7192400e064ad50d /glx/glxdri.c | |
parent | 0b7b89fbac0b3865b2cf51295c68a5f4c7523f28 (diff) |
xalloc+memset(0) -> xcalloc
Diffstat (limited to 'glx/glxdri.c')
-rw-r--r-- | glx/glxdri.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/glx/glxdri.c b/glx/glxdri.c index c33b5bd9b..ce098e1e6 100644 --- a/glx/glxdri.c +++ b/glx/glxdri.c @@ -613,11 +613,10 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen, if (baseShareContext && baseShareContext->isDirect) return NULL; - context = xalloc(sizeof *context); + context = xcalloc(1, sizeof *context); if (context == NULL) return NULL; - memset(context, 0, sizeof *context); context->base.destroy = __glXDRIcontextDestroy; context->base.makeCurrent = __glXDRIcontextMakeCurrent; context->base.loseCurrent = __glXDRIcontextLoseCurrent; @@ -672,12 +671,10 @@ __glXDRIscreenCreateDrawable(__GLXscreen *screen, GLboolean retval; drm_drawable_t hwDrawable; - private = xalloc(sizeof *private); + private = xcalloc(1, sizeof *private); if (private == NULL) return NULL; - memset(private, 0, sizeof *private); - if (!__glXDrawableInit(&private->base, screen, pDraw, type, drawId, glxConfig)) { xfree(private); @@ -950,10 +947,9 @@ __glXDRIscreenProbe(ScreenPtr pScreen) return NULL; } - screen = xalloc(sizeof *screen); + screen = xcalloc(1, sizeof *screen); if (screen == NULL) return NULL; - memset(screen, 0, sizeof *screen); screen->base.destroy = __glXDRIscreenDestroy; screen->base.createContext = __glXDRIscreenCreateContext; |