util: New macro CONST_CAST.
[sliver-openvswitch.git] / lib / hmap.h
index 9d07e84..2867bfa 100644 (file)
@@ -247,7 +247,7 @@ hmap_next_with_hash__(const struct hmap_node *node, size_t hash)
     while (node != NULL && node->hash != hash) {
         node = node->next;
     }
-    return (struct hmap_node *) node;
+    return CONST_CAST(struct hmap_node *, node);
 }
 
 /* Returns the first node in 'hmap' with the given 'hash', or a null pointer if