[ovs-git] Open vSwitch: Avoid shadowing local variable names. (master)

dev at openvswitch.org dev at openvswitch.org
Mon Sep 20 16:40:16 UTC 2010


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Open vSwitch".

The branch, master has been updated
       via  2a022368f4b37559de5d5621a88c648023493f75 (commit)
       via  1089aab7136612acb86cdcd638d7d2261311531a (commit)
      from  00456ddda4110f7f75ea9f8a703b31c7f2df7649 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 2a022368f4b37559de5d5621a88c648023493f75
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=2a022368f4b37559de5d5621a88c648023493f75
Author: Ben Pfaff <blp at nicira.com>
		
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.


commit 1089aab7136612acb86cdcd638d7d2261311531a
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=1089aab7136612acb86cdcd638d7d2261311531a
Author: Ben Pfaff <blp at nicira.com>
		
ovsdb: Fix bug in "wait" command implementation.
		
The declaration of "error" that this commit removes shadowed an outer local
declaration of "error", which caused errors detected by this code not to be
propagated up to the outer level.

Found with GCC -Wshadow.


-----------------------------------------------------------------------

Summary of changes:
 lib/dpif-netdev.c          |    1 -
 lib/dynamic-string.c       |    2 --
 lib/json.c                 |    1 -
 lib/learning-switch.c      |    6 +++---
 lib/netdev-linux.c         |    6 +++---
 lib/netlink.c              |   10 +++++-----
 lib/ofp-parse.c            |    6 +++---
 lib/ovsdb-idl.c            |    8 ++++----
 lib/process.c              |    2 +-
 lib/stream-fd.c            |    2 +-
 lib/stream-ssl.c           |    6 +++---
 ofproto/ofproto.c          |    2 --
 ovsdb/execution.c          |    3 ---
 tests/test-csum.c          |    3 +--
 tests/test-ovsdb.c         |    6 ++++--
 utilities/ovs-controller.c |    6 ++----
 utilities/ovs-openflowd.c  |    4 ----
 utilities/ovs-vsctl.c      |   24 +++++++++++-------------
 vswitchd/bridge.c          |    4 ----
 19 files changed, 41 insertions(+), 61 deletions(-)


hooks/post-receive
-- 
Open vSwitch




More information about the git mailing list