chiark
/
gitweb
/
~ian
/
innduct.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0ce2fa6
)
Make FOR_LIST_NODE and use it for FOR_CONN
author
Ian Jackson
<ian@liberator.relativity.greenend.org.uk>
Tue, 1 Jun 2010 18:57:47 +0000
(19:57 +0100)
committer
Ian Jackson
<ian@liberator.relativity.greenend.org.uk>
Tue, 1 Jun 2010 18:57:47 +0000
(19:57 +0100)
innduct.h
patch
|
blob
|
history
diff --git
a/innduct.h
b/innduct.h
index ddd17e69c59050b979bec2e8c131bd4869e11221..273fb5ec7758df00f196a34dfe8580621b45c5c4 100644
(file)
--- a/
innduct.h
+++ b/
innduct.h
@@
-84,8
+84,10
@@
#define DUMPV(fmt,pfx,v) fprintf(f, " " #v "=" fmt, pfx v);
-#define FOR_CONN(conn) \
- for ((conn)=LIST_HEAD(conns); (conn); (conn)=LIST_NEXT((conn)))
+#define FOR_LIST_NODE(nodevar, list) \
+ for ((nodevar)=LIST_HEAD(list); (nodevar); (nodevar)=LIST_NEXT((nodevar)))
+
+#define FOR_CONN(conn) FOR_LIST_NODE(conn, conns)
/*----- doubly linked lists -----*/