summaryrefslogtreecommitdiff
path: root/src/hashtab.c
diff options
context:
space:
mode:
authorAlexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>2005-02-11 10:53:05 +0000
committerAlexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>2005-02-11 10:53:05 +0000
commitdf39054c869d26b1aeeaca958b54869521802712 (patch)
treef9ace3a7fc35498f101ec41da1d83edf47ccbd06 /src/hashtab.c
parentc3ba808aef8fcf59b04eb959e9958159648eae8a (diff)
Import changes from XORG-6.8.2CYGWIN-6_8_2-MERGECYGWIN
Diffstat (limited to 'src/hashtab.c')
-rw-r--r--src/hashtab.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/hashtab.c b/src/hashtab.c
index f07cb6d..f5a71dd 100644
--- a/src/hashtab.c
+++ b/src/hashtab.c
@@ -138,13 +138,13 @@ HashTableGrows(table)
unsigned int size = table->size;
xpmHashAtom *t, *p;
int i;
- int oldSize = size;
+ unsigned int oldSize = size;
t = atomTable;
HASH_TABLE_GROWS
table->size = size;
table->limit = size / 3;
- if (size >= SIZE_MAX / sizeof(*atomTable))
+ if (size >= UINT_MAX / sizeof(*atomTable))
return (XpmNoMemory);
atomTable = (xpmHashAtom *) XpmMalloc(size * sizeof(*atomTable));
if (!atomTable)
@@ -206,7 +206,7 @@ xpmHashTableInit(table)
table->size = INITIAL_HASH_SIZE;
table->limit = table->size / 3;
table->used = 0;
- if (table->size >= SIZE_MAX / sizeof(*atomTable))
+ if (table->size >= UINT_MAX / sizeof(*atomTable))
return (XpmNoMemory);
atomTable = (xpmHashAtom *) XpmMalloc(table->size * sizeof(*atomTable));
if (!atomTable)