aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/lib/X11/omGeneric.c
diff options
context:
space:
mode:
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++) {