aboutsummaryrefslogtreecommitdiff
path: root/libXfont/src/util
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
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')
-rw-r--r--libXfont/src/util/atom.c20
-rw-r--r--libXfont/src/util/miscutil.c2
2 files changed, 13 insertions, 9 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
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