changeset 4040:0546d7f367db

(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.
author Paul Eggert <eggert@cs.ucla.edu>
date Thu, 28 Nov 2002 00:34:24 +0000
parents 7c15210f0e35
children 8c8f0566f03c
files lib/hash.c
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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;