aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/lib/X11/omGeneric.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/omGeneric.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/omGeneric.c')
-rw-r--r--nx-X11/lib/X11/omGeneric.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/nx-X11/lib/X11/omGeneric.c b/nx-X11/lib/X11/omGeneric.c
index 32a066a75..fd8742436 100644
--- a/nx-X11/lib/X11/omGeneric.c
+++ b/nx-X11/lib/X11/omGeneric.c
@@ -1656,10 +1656,9 @@ create_oc(
XOCMethodsList methods_list = oc_methods_list;
int count;
- oc = (XOC) Xmalloc(sizeof(XOCGenericRec));
+ oc = Xcalloc(1, sizeof(XOCGenericRec));
if (oc == NULL)
return (XOC) NULL;
- bzero((char *) oc, sizeof(XOCGenericRec));
oc->core.om = om;
@@ -1844,10 +1843,9 @@ create_om(
{
XOM om;
- om = (XOM) Xmalloc(sizeof(XOMGenericRec));
+ om = Xcalloc(1, sizeof(XOMGenericRec));
if (om == NULL)
return (XOM) NULL;
- bzero((char *) om, sizeof(XOMGenericRec));
om->methods = &methods;
om->core.lcd = lcd;
@@ -1915,10 +1913,9 @@ read_EncodingInfo(
FontData font_data,ret;
char *buf, *bufptr,*scp;
int len;
- font_data = (FontData) Xmalloc(sizeof(FontDataRec) * count);
+ font_data = Xcalloc(count, sizeof(FontDataRec));
if (font_data == NULL)
return NULL;
- bzero((char *) font_data, sizeof(FontDataRec) * count);
ret = font_data;
for ( ; count-- > 0; font_data++) {