aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/lib/X11/lcPublic.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2011-04-12 21:27:45 -0700
committerUlrich Sibiller <uli42@gmx.de>2016-10-19 21:40:25 +0200
commit7d7224d8543e85e3a34a1cddf99f3eac9aa9050b (patch)
tree15e7affd8446b031fe6bc98bcb5b0419dc04ab7b /nx-X11/lib/X11/lcPublic.c
parent369c956683108226a30bbdd55355f0d8ae57eeb4 (diff)
downloadnx-libs-7d7224d8543e85e3a34a1cddf99f3eac9aa9050b.tar.gz
nx-libs-7d7224d8543e85e3a34a1cddf99f3eac9aa9050b.tar.bz2
nx-libs-7d7224d8543e85e3a34a1cddf99f3eac9aa9050b.zip
Replace Xmalloc+bzero pairs with Xcalloc calls
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
Diffstat (limited to 'nx-X11/lib/X11/lcPublic.c')
-rw-r--r--nx-X11/lib/X11/lcPublic.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/nx-X11/lib/X11/lcPublic.c b/nx-X11/lib/X11/lcPublic.c
index 2c02f5fba..43b9286e7 100644
--- a/nx-X11/lib/X11/lcPublic.c
+++ b/nx-X11/lib/X11/lcPublic.c
@@ -80,15 +80,13 @@ create(
XLCd lcd;
XLCdPublicMethods new;
- lcd = (XLCd) Xmalloc(sizeof(XLCdRec));
+ lcd = Xcalloc(1, sizeof(XLCdRec));
if (lcd == NULL)
return (XLCd) NULL;
- bzero((char *) lcd, sizeof(XLCdRec));
- lcd->core = (XLCdCore) Xmalloc(sizeof(XLCdPublicRec));
+ lcd->core = Xcalloc(1, sizeof(XLCdPublicRec));
if (lcd->core == NULL)
goto err;
- bzero((char *) lcd->core, sizeof(XLCdPublicRec));
new = (XLCdPublicMethods) Xmalloc(sizeof(XLCdPublicMethodsRec));
if (new == NULL)