Thread (4 messages) flat view 4 messages, 3 authors, 2018-01-15
STALE3137d

[PATCH] Removed unnecessary void* from hashmap.h that caused compile warnings

From: <hidden>
Date: 2018-01-14 18:08:10
Subsystem: the rest · Maintainer: Linus Torvalds

From: "Randall S. Becker" <redacted>

* hashmap.h: Revised the while loop in the hashmap_enable_item_counting
	to remove unneeded void* item.

Signed-off-by: Randall S. Becker <redacted>
---
 hashmap.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/hashmap.h b/hashmap.h
index 7ce79f3..d375d9c 100644
--- a/hashmap.h
+++ b/hashmap.h
@@ -400,7 +400,6 @@ static inline void hashmap_disable_item_counting(struct hashmap *map)
  */
 static inline void hashmap_enable_item_counting(struct hashmap *map)
 {
-	void *item;
 	unsigned int n = 0;
 	struct hashmap_iter iter;
 
@@ -408,7 +407,7 @@ static inline void hashmap_enable_item_counting(struct hashmap *map)
 		return;
 
 	hashmap_iter_init(map, &iter);
-	while ((item = hashmap_iter_next(&iter)))
+	while (hashmap_iter_next(&iter))
 		n++;
 
 	map->do_count_items = 1;
-- 
2.8.5.23.g6fa7ec3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help