mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-23 03:03:02 +00:00
Sync with gnulib.
This commit is contained in:
10
lib/hash.c
10
lib/hash.c
@@ -262,7 +262,7 @@ hash_lookup (const Hash_table *table, const void *entry)
|
|||||||
= table->bucket + table->hasher (entry, table->n_buckets);
|
= table->bucket + table->hasher (entry, table->n_buckets);
|
||||||
struct hash_entry *cursor;
|
struct hash_entry *cursor;
|
||||||
|
|
||||||
if (table->bucket_limit <= bucket)
|
if (! (bucket < table->bucket_limit))
|
||||||
abort ();
|
abort ();
|
||||||
|
|
||||||
if (bucket->data == NULL)
|
if (bucket->data == NULL)
|
||||||
@@ -293,7 +293,7 @@ hash_get_first (const Hash_table *table)
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
for (bucket = table->bucket; ; bucket++)
|
for (bucket = table->bucket; ; bucket++)
|
||||||
if (table->bucket_limit <= bucket)
|
if (! (bucket < table->bucket_limit))
|
||||||
abort ();
|
abort ();
|
||||||
else if (bucket->data)
|
else if (bucket->data)
|
||||||
return bucket->data;
|
return bucket->data;
|
||||||
@@ -310,7 +310,7 @@ hash_get_next (const Hash_table *table, const void *entry)
|
|||||||
= table->bucket + table->hasher (entry, table->n_buckets);
|
= table->bucket + table->hasher (entry, table->n_buckets);
|
||||||
struct hash_entry *cursor;
|
struct hash_entry *cursor;
|
||||||
|
|
||||||
if (table->bucket_limit <= bucket)
|
if (! (bucket < table->bucket_limit))
|
||||||
abort ();
|
abort ();
|
||||||
|
|
||||||
/* Find next entry in the same bucket. */
|
/* Find next entry in the same bucket. */
|
||||||
@@ -754,7 +754,7 @@ hash_find_entry (Hash_table *table, const void *entry,
|
|||||||
= table->bucket + table->hasher (entry, table->n_buckets);
|
= table->bucket + table->hasher (entry, table->n_buckets);
|
||||||
struct hash_entry *cursor;
|
struct hash_entry *cursor;
|
||||||
|
|
||||||
if (table->bucket_limit <= bucket)
|
if (! (bucket < table->bucket_limit))
|
||||||
abort ();
|
abort ();
|
||||||
|
|
||||||
*bucket_head = bucket;
|
*bucket_head = bucket;
|
||||||
@@ -850,7 +850,7 @@ hash_rehash (Hash_table *table, unsigned candidate)
|
|||||||
= (new_table->bucket
|
= (new_table->bucket
|
||||||
+ new_table->hasher (data, new_table->n_buckets));
|
+ new_table->hasher (data, new_table->n_buckets));
|
||||||
|
|
||||||
if (new_table->bucket_limit <= new_bucket)
|
if (! (new_bucket < new_table->bucket_limit))
|
||||||
abort ();
|
abort ();
|
||||||
|
|
||||||
next = cursor->next;
|
next = cursor->next;
|
||||||
|
|||||||
Reference in New Issue
Block a user