# HG changeset patch # User Paul Eggert # Date 1038443664 0 # Node ID 0546d7f367dbd40ccd3dd8320841a076db291ae8 # Parent 7c15210f0e35e6c58eb8584eff95d2b08bda4e87 (hash_lookup, hash_get_first, hash_get_next, hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();' with `if (! (value < limit)) abort ();', for readability. diff --git a/lib/hash.c b/lib/hash.c --- a/lib/hash.c +++ b/lib/hash.c @@ -262,7 +262,7 @@ = table->bucket + table->hasher (entry, table->n_buckets); struct hash_entry *cursor; - if (table->bucket_limit <= bucket) + if (! (bucket < table->bucket_limit)) abort (); if (bucket->data == NULL) @@ -293,7 +293,7 @@ return NULL; for (bucket = table->bucket; ; bucket++) - if (table->bucket_limit <= bucket) + if (! (bucket < table->bucket_limit)) abort (); else if (bucket->data) return bucket->data; @@ -310,7 +310,7 @@ = table->bucket + table->hasher (entry, table->n_buckets); struct hash_entry *cursor; - if (table->bucket_limit <= bucket) + if (! (bucket < table->bucket_limit)) abort (); /* Find next entry in the same bucket. */ @@ -754,7 +754,7 @@ = table->bucket + table->hasher (entry, table->n_buckets); struct hash_entry *cursor; - if (table->bucket_limit <= bucket) + if (! (bucket < table->bucket_limit)) abort (); *bucket_head = bucket; @@ -850,7 +850,7 @@ = (new_table->bucket + new_table->hasher (data, new_table->n_buckets)); - if (new_table->bucket_limit <= new_bucket) + if (! (new_bucket < new_table->bucket_limit)) abort (); next = cursor->next;