projects
/
openvswitch
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ebe4bb8
)
New macro PORT_ARRAY_FOR_EACH.
author
Ben Pfaff
<blp@nicira.com>
Mon, 2 Mar 2009 19:08:16 +0000
(11:08 -0800)
committer
Ben Pfaff
<blp@nicira.com>
Mon, 2 Mar 2009 21:42:06 +0000
(13:42 -0800)
lib/port-array.h
patch
|
blob
|
history
diff --git
a/lib/port-array.h
b/lib/port-array.h
index 1522fccbb920702f60a4399d9645f78574473213..4b95e8373cc0cd9fa66820b2c4ffca8c6b91ba70 100644
(file)
--- a/
lib/port-array.h
+++ b/
lib/port-array.h
@@
-105,4
+105,8
@@
void *port_array_first(const struct port_array *, unsigned int *);
void *port_array_next(const struct port_array *, unsigned int *);
unsigned int port_array_count(const struct port_array *);
+#define PORT_ARRAY_FOR_EACH(DATA, ARRAY, PORT_NO) \
+ for ((DATA) = port_array_first(ARRAY, &(PORT_NO)); (DATA) != NULL; \
+ (DATA) = port_array_next(ARRAY, &(PORT_NO)))
+
#endif /* port-array.h */