CC: Russell Bryant <rbry...@redhat.com>
Signed-off-by: Ben Pfaff <b...@nicira.com>
---
 lib/hmap.h |   12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/lib/hmap.h b/lib/hmap.h
index 85241f0..6215be6 100644
--- a/lib/hmap.h
+++ b/lib/hmap.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2009, 2010, 2012, 2013 Nicira, Inc.
+ * Copyright (c) 2008, 2009, 2010, 2012, 2013, 2015 Nicira, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -124,6 +124,16 @@ struct hmap_node *hmap_random_node(const struct hmap *);
  * iteration).
  *
  * HASH is only evaluated once.
+ *
+ *
+ * Warning
+ * -------
+ *
+ * When the loop terminates, &NODE->MEMBER will equal NULL.  Unless MEMBER is
+ * the first member in its struct, this means that NODE itself will not be
+ * NULL.
+ *
+ * (This is true for all of the HMAP_FOR_EACH_*() macros.)
  */
 #define HMAP_FOR_EACH_WITH_HASH(NODE, MEMBER, HASH, HMAP)               \
     for (INIT_CONTAINER(NODE, hmap_first_with_hash(HMAP, HASH), MEMBER); \
-- 
1.7.10.4

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to