diff options
author | marha <marha@users.sourceforge.net> | 2009-07-25 13:45:56 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2009-07-25 13:45:56 +0000 |
commit | 2fb179f86b0f9ecb7876759b87f9c64634a3f114 (patch) | |
tree | 351df3c4d5648356980bc078544e25820e4d26fc /libXfont/src/util/atom.c | |
parent | a7be905cf4423239285228d4e23caf2172adfa8b (diff) | |
download | vcxsrv-2fb179f86b0f9ecb7876759b87f9c64634a3f114.tar.gz vcxsrv-2fb179f86b0f9ecb7876759b87f9c64634a3f114.tar.bz2 vcxsrv-2fb179f86b0f9ecb7876759b87f9c64634a3f114.zip |
Added libXfont-1.4.0.tar.gz.
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); |