summaryrefslogtreecommitdiffhomepage
path: root/src/hashmap.c
diff options
context:
space:
mode:
authorRobert James Kaes <rjkaes@users.sourceforge.net>2003-05-31 23:02:21 +0000
committerRobert James Kaes <rjkaes@users.sourceforge.net>2003-05-31 23:02:21 +0000
commit77ca1c8ce0df4d7733bb5a382ca8c18adba93e1c (patch)
tree75dee7eb6b1f1de3ddbdd4104a2fdd112322f27a /src/hashmap.c
parent86c9d6908606c7c47d305b46a242a417c0f22673 (diff)
# Changed all the for calls to use the != test rather than < test.
The change was recommended in the C/C++ User Journal magazine.
Diffstat (limited to 'src/hashmap.c')
-rw-r--r--src/hashmap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/hashmap.c b/src/hashmap.c
index c7aa3a5..4f7773d 100644
--- a/src/hashmap.c
+++ b/src/hashmap.c
@@ -1,4 +1,4 @@
-/* $Id: hashmap.c,v 1.11 2002-05-24 04:45:32 rjkaes Exp $
+/* $Id: hashmap.c,v 1.12 2003-05-31 23:02:21 rjkaes Exp $
*
* A hashmap implementation. The keys are case-insensitive NULL terminated
* strings, and the data is arbitrary lumps of data. Copies of both the
@@ -158,7 +158,7 @@ hashmap_delete(hashmap_t map)
if (map == NULL)
return -EINVAL;
- for (i = 0; i < map->size; i++) {
+ for (i = 0; i != map->size; i++) {
if (map->buckets[i] != NULL) {
delete_hashbucket(map->buckets[i]);
map->buckets[i] = NULL;
@@ -313,7 +313,7 @@ hashmap_find(hashmap_t map, const char* key)
* Loop through all the keys and look for the first occurrence
* of a particular key.
*/
- for (i = 0; i < map->size; i++) {
+ for (i = 0; i != map->size; i++) {
ptr = map->buckets[i];
while (ptr) {
@@ -353,7 +353,7 @@ hashmap_return_entry(hashmap_t map, hashmap_iter iter,
if (!map || iter < 0 || !key || !data)
return -EINVAL;
- for (i = 0; i < map->size; i++) {
+ for (i = 0; i != map->size; i++) {
ptr = map->buckets[i];
while (ptr) {
if (count == iter) {