diff options
author | marha <marha@users.sourceforge.net> | 2009-07-25 14:29:10 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2009-07-25 14:29:10 +0000 |
commit | ddfb922180a6a847d52609592a2bdb37179ca439 (patch) | |
tree | 7cc662bfb9ffb45c4c4452ea373e3c1a843b395a /libXfont/src/util/atom.c | |
parent | 02934f83dd4f5848083e2e5cdbc6ef7f60361f06 (diff) | |
parent | 2fb179f86b0f9ecb7876759b87f9c64634a3f114 (diff) | |
download | vcxsrv-ddfb922180a6a847d52609592a2bdb37179ca439.tar.gz vcxsrv-ddfb922180a6a847d52609592a2bdb37179ca439.tar.bz2 vcxsrv-ddfb922180a6a847d52609592a2bdb37179ca439.zip |
svn merge file:///D:/svnrepos/vcxsrv/branches/released .
Gives currently link errors. xorg-server needs to be upgraded to.
Diffstat (limited to 'libXfont/src/util/atom.c')
-rw-r--r-- | libXfont/src/util/atom.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/libXfont/src/util/atom.c b/libXfont/src/util/atom.c index b770dc9de..bfb05ccbd 100644 --- a/libXfont/src/util/atom.c +++ b/libXfont/src/util/atom.c @@ -84,14 +84,13 @@ ResizeHashTable (void) newHashSize = 1024; else newHashSize = hashSize * 2; - newHashTable = (AtomListPtr *) xalloc (newHashSize * sizeof (AtomListPtr)); + newHashTable = calloc (newHashSize, sizeof (AtomListPtr)); if (!newHashTable) { fprintf(stderr, "ResizeHashTable(): Error: Couldn't allocate" " newHashTable (%ld)\n", newHashSize * (unsigned long)sizeof (AtomListPtr)); return FALSE; } - bzero ((char *) newHashTable, newHashSize * sizeof (AtomListPtr)); newHashMask = newHashSize - 1; newRehash = (newHashMask - 2); for (i = 0; i < hashSize; i++) @@ -111,7 +110,7 @@ ResizeHashTable (void) newHashTable[h] = hashTable[i]; } } - xfree (hashTable); + free (hashTable); hashTable = newHashTable; hashSize = newHashSize; hashMask = newHashMask; @@ -127,7 +126,7 @@ ResizeReverseMap (void) reverseMapSize = 1000; else reverseMapSize *= 2; - reverseMap = (AtomListPtr *) xrealloc (reverseMap, reverseMapSize * sizeof (AtomListPtr)); + reverseMap = realloc (reverseMap, reverseMapSize * sizeof (AtomListPtr)); if (!reverseMap) { fprintf(stderr, "ResizeReverseMap(): Error: Couldn't reallocate" " reverseMap (%ld)\n", @@ -187,7 +186,7 @@ MakeAtom(char *string, unsigned len, int makeit) } if (!makeit) return None; - a = (AtomListPtr) xalloc (sizeof (AtomListRec) + len + 1); + a = malloc (sizeof (AtomListRec) + len + 1); if (a == NULL) { fprintf(stderr, "MakeAtom(): Error: Couldn't allocate AtomListRec" " (%ld)\n", (unsigned long)sizeof (AtomListRec) + len + 1); |