From d02e6760412c7a96abbc4d0add5dd8d5e83bbe27 Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 28 Mar 2014 17:32:23 +0100 Subject: Update following packages: libXfont-1.4.7 xproto-7.0.25 --- libXfont/src/util/atom.c | 20 ++++++++++++-------- libXfont/src/util/miscutil.c | 2 +- 2 files changed, 13 insertions(+), 9 deletions(-) (limited to 'libXfont/src/util') diff --git a/libXfont/src/util/atom.c b/libXfont/src/util/atom.c index c47cb5c80..37811f91e 100644 --- a/libXfont/src/util/atom.c +++ b/libXfont/src/util/atom.c @@ -118,19 +118,23 @@ ResizeHashTable (void) static int ResizeReverseMap (void) { - int ret = TRUE; + AtomListPtr *newMap; + int newMapSize; + if (reverseMapSize == 0) - reverseMapSize = 1000; + newMapSize = 1000; else - reverseMapSize *= 2; - reverseMap = realloc (reverseMap, reverseMapSize * sizeof (AtomListPtr)); - if (!reverseMap) { + newMapSize = reverseMapSize * 2; + newMap = realloc (reverseMap, newMapSize * sizeof (AtomListPtr)); + if (newMap == NULL) { fprintf(stderr, "ResizeReverseMap(): Error: Couldn't reallocate" " reverseMap (%ld)\n", - reverseMapSize * (unsigned long)sizeof(AtomListPtr)); - ret = FALSE; + newMapSize * (unsigned long)sizeof(AtomListPtr)); + return FALSE; } - return ret; + reverseMap = newMap; + reverseMapSize = newMapSize; + return TRUE; } static int diff --git a/libXfont/src/util/miscutil.c b/libXfont/src/util/miscutil.c index 7173d3640..3d802d2f5 100644 --- a/libXfont/src/util/miscutil.c +++ b/libXfont/src/util/miscutil.c @@ -47,7 +47,7 @@ extern void BuiltinRegisterFpeFunctions(void); #ifndef NO_WEAK_SYMBOLS /* make sure everything initializes themselves at least once */ -weak long serverGeneration = 1; +weak unsigned long serverGeneration = 1; #endif weak void -- cgit v1.2.3