From 96d6df5da9cddedf4931bf8e17f96e242467c661 Mon Sep 17 00:00:00 2001 From: marha Date: Wed, 27 Apr 2011 06:58:32 +0000 Subject: xserver libX11 libxtrans mesa pixman xkeyboard-config git update 27 Apr 2011 --- libX11/src/Xrm.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'libX11/src/Xrm.c') diff --git a/libX11/src/Xrm.c b/libX11/src/Xrm.c index c466cae7f..53467aedc 100644 --- a/libX11/src/Xrm.c +++ b/libX11/src/Xrm.c @@ -581,23 +581,21 @@ static void GrowTable( ltable = (LTable)table; /* cons up a copy to make MoveValues look symmetric */ otable = *ltable; - ltable->buckets = (VEntry *)Xmalloc(i * sizeof(VEntry)); + ltable->buckets = Xcalloc(i, sizeof(VEntry)); if (!ltable->buckets) { ltable->buckets = otable.buckets; return; } ltable->table.mask = i - 1; - bzero((char *)ltable->buckets, i * sizeof(VEntry)); MoveValues(&otable, ltable); } else { register NTable ntable; - ntable = (NTable)Xmalloc(sizeof(NTableRec) + i * sizeof(NTable)); + ntable = Xcalloc(1, sizeof(NTableRec) + (i * sizeof(NTable))); if (!ntable) return; *ntable = *table; ntable->mask = i - 1; - bzero((char *)NodeBuckets(ntable), i * sizeof(NTable)); *prev = ntable; MoveTables(table, ntable); } -- cgit v1.2.3