aboutsummaryrefslogtreecommitdiff
path: root/libXfont/src/util/atom.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-03-28 17:32:23 +0100
committermarha <marha@users.sourceforge.net>2014-03-28 17:32:23 +0100
commitd02e6760412c7a96abbc4d0add5dd8d5e83bbe27 (patch)
tree4b6d1589095565bbd7064aa6b7217b69910bbae3 /libXfont/src/util/atom.c
parent13d96866ca5d0e2be51f20a72da9e0f7032a16ea (diff)
downloadvcxsrv-d02e6760412c7a96abbc4d0add5dd8d5e83bbe27.tar.gz
vcxsrv-d02e6760412c7a96abbc4d0add5dd8d5e83bbe27.tar.bz2
vcxsrv-d02e6760412c7a96abbc4d0add5dd8d5e83bbe27.zip
Update following packages:
libXfont-1.4.7 xproto-7.0.25
Diffstat (limited to 'libXfont/src/util/atom.c')
-rw-r--r--libXfont/src/util/atom.c20
1 files changed, 12 insertions, 8 deletions
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