summaryrefslogtreecommitdiff
path: root/src/hashtab.c
diff options
context:
space:
mode:
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)