* lib/hash.c (hash_get_next): Remove unnecessary test against NULL.
Reported by Eric Blake.
+2010-08-30 Bruno Haible <bruno@clisp.org>
+
+ hash: silence spurious clang warning
+ * lib/hash.c (hash_get_next): Remove unnecessary test against NULL.
+ Reported by Eric Blake.
+
2010-08-30 Eric Blake <eblake@redhat.com>
strstr, memmem, strcasestr: avoid leaked shell message
abort ();
/* Find next entry in the same bucket. */
- for (cursor = bucket; cursor; cursor = cursor->next)
- if (cursor->data == entry && cursor->next)
- return cursor->next->data;
+ cursor = bucket;
+ do
+ {
+ if (cursor->data == entry && cursor->next)
+ return cursor->next->data;
+ cursor = cursor->next;
+ }
+ while (cursor != NULL);
/* Find first entry in any subsequent bucket. */
while (++bucket < table->bucket_limit)