diff options
| author | Ben Pfaff <blp@nicira.com> | 2010-09-02 10:09:09 -0700 |
|---|---|---|
| committer | Ben Pfaff <blp@nicira.com> | 2010-09-20 09:39:54 -0700 |
| commit | 2a022368f4b37559de5d5621a88c648023493f75 (patch) | |
| tree | bfb5291578273782b71ad2d5fbdb72744e94d857 /lib/learning-switch.c | |
| parent | 1089aab7136612acb86cdcd638d7d2261311531a (diff) | |
| download | openvswitch-2a022368f4b37559de5d5621a88c648023493f75.tar.gz | |
Avoid shadowing local variable names.
All of these changes avoid using the same name for two local variables
within a same function. None of them are actual bugs as far as I can tell,
but any of them could be confusing to the casual reader.
The one in lib/ovsdb-idl.c is particularly brilliant: inner and outer
loops both using (different) variables named 'i'.
Found with GCC -Wshadow.
Diffstat (limited to 'lib/learning-switch.c')
| -rw-r--r-- | lib/learning-switch.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/learning-switch.c b/lib/learning-switch.c index e189f1e44..4e7645d7c 100644 --- a/lib/learning-switch.c +++ b/lib/learning-switch.c @@ -220,10 +220,10 @@ lswitch_process_packet(struct lswitch *sw, struct rconn *rconn, } } if (VLOG_IS_DBG_ENABLED()) { - char *p = ofp_to_string(msg->data, msg->size, 2); + char *s = ofp_to_string(msg->data, msg->size, 2); VLOG_DBG_RL(&rl, "%016llx: OpenFlow packet ignored: %s", - sw->datapath_id, p); - free(p); + sw->datapath_id, s); + free(s); } } |
