summaryrefslogtreecommitdiff
path: root/lib/hash.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-10-31 14:00:18 +0000
committerJim Meyering <jim@meyering.net>2003-10-31 14:00:18 +0000
commitf7f606641f373b3af829cef22d8d25549176d7e4 (patch)
treea65c86383abf39667376cc08b5cfa67770062f1f /lib/hash.c
parent7291dc2b9d626197ee52ead46667a7523f477b68 (diff)
downloadcoreutils-f7f606641f373b3af829cef22d8d25549176d7e4.tar.xz
Update from gnulib.
Diffstat (limited to 'lib/hash.c')
-rw-r--r--lib/hash.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/hash.c b/lib/hash.c
index ad4599e4d..19e593fef 100644
--- a/lib/hash.c
+++ b/lib/hash.c
@@ -568,10 +568,10 @@ hash_initialize (size_t candidate, const Hash_tuning *tuning,
candidate = new_candidate;
}
- if (SIZE_MAX / sizeof *table->bucket < candidate)
+ if (xalloc_oversized (candidate, sizeof *table->bucket))
goto fail;
table->n_buckets = next_prime (candidate);
- if (SIZE_MAX / sizeof *table->bucket < table->n_buckets)
+ if (xalloc_oversized (table->n_buckets, sizeof *table->bucket))
goto fail;
table->bucket = calloc (table->n_buckets, sizeof *table->bucket);