hmap: New macro HMAP_NODE_NULL_INITIALIZER.
authorBen Pfaff <blp@nicira.com>
Tue, 26 Oct 2010 00:11:06 +0000 (17:11 -0700)
committerBen Pfaff <blp@nicira.com>
Fri, 29 Oct 2010 16:48:47 +0000 (09:48 -0700)
lib/hmap.h

index 04e51bc..3929c9c 100644 (file)
@@ -38,6 +38,7 @@ static inline size_t hmap_node_hash(const struct hmap_node *node)
 }
 
 #define HMAP_NODE_NULL ((struct hmap_node *) 1)
+#define HMAP_NODE_NULL_INITIALIZER { 0, HMAP_NODE_NULL }
 
 /* Returns true if 'node' has been set to null by hmap_node_nullify() and has
  * not been un-nullified by being inserted into an hmap. */