summaryrefslogtreecommitdiff
path: root/utilities/ovs-openflowd.c
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2010-09-02 10:09:09 -0700
committerBen Pfaff <blp@nicira.com>2010-09-20 09:39:54 -0700
commit2a022368f4b37559de5d5621a88c648023493f75 (patch)
treebfb5291578273782b71ad2d5fbdb72744e94d857 /utilities/ovs-openflowd.c
parent1089aab7136612acb86cdcd638d7d2261311531a (diff)
downloadopenvswitch-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 'utilities/ovs-openflowd.c')
-rw-r--r--utilities/ovs-openflowd.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/utilities/ovs-openflowd.c b/utilities/ovs-openflowd.c
index 8cb50e4b4..945b11d05 100644
--- a/utilities/ovs-openflowd.c
+++ b/utilities/ovs-openflowd.c
@@ -458,8 +458,6 @@ parse_options(int argc, char *argv[], struct ofsettings *s)
s->n_controllers = controllers.n;
s->controllers = xmalloc(s->n_controllers * sizeof *s->controllers);
if (argc > 1) {
- size_t i;
-
for (i = 0; i < s->n_controllers; i++) {
s->controllers[i] = controller_opts;
s->controllers[i].target = controllers.names[i];
@@ -468,8 +466,6 @@ parse_options(int argc, char *argv[], struct ofsettings *s)
/* Sanity check. */
if (controller_opts.band == OFPROTO_OUT_OF_BAND) {
- size_t i;
-
for (i = 0; i < s->n_controllers; i++) {
if (!strcmp(s->controllers[i].target, "discover")) {
ovs_fatal(0, "Cannot perform discovery with out-of-band "