ofproto-dpif-xlate: Fix clash between macro argument and struct member name.
authorHuanle Han <hanxueluo@gmail.com>
Fri, 15 Jan 2016 15:24:59 +0000 (23:24 +0800)
committerBen Pfaff <blp@ovn.org>
Fri, 5 Feb 2016 23:36:05 +0000 (15:36 -0800)
Argument name "entries" is same as the member "entries" of xcache.
It will lead to compile error if we pass an argument whose name is
not "entries".

Signed-off-by: Huanle Han <hanxueluo@gmail.com>
ofproto/ofproto-dpif-xlate.c

index 1edc1b0..a6ea067 100644 (file)
@@ -457,11 +457,11 @@ struct xc_entry {
     } u;
 };
 
-#define XC_ENTRY_FOR_EACH(entry, entries, xcache)               \
-    entries = xcache->entries;                                  \
-    for (entry = ofpbuf_try_pull(&entries, sizeof *entry);      \
-         entry;                                                 \
-         entry = ofpbuf_try_pull(&entries, sizeof *entry))
+#define XC_ENTRY_FOR_EACH(ENTRY, ENTRIES, XCACHE)               \
+    ENTRIES = XCACHE->entries;                                  \
+    for (ENTRY = ofpbuf_try_pull(&ENTRIES, sizeof *ENTRY);      \
+         ENTRY;                                                 \
+         ENTRY = ofpbuf_try_pull(&ENTRIES, sizeof *ENTRY))
 
 struct xlate_cache {
     struct ofpbuf entries;