2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-29 15:28:56 +00:00

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.
This commit is contained in:
Ben Pfaff
2010-09-02 10:09:09 -07:00
parent 1089aab713
commit 2a022368f4
19 changed files with 41 additions and 60 deletions

View File

@@ -147,8 +147,6 @@ ds_put_format_valist(struct ds *ds, const char *format, va_list args_)
if (needed < available) {
ds->length += needed;
} else {
size_t available;
ds_reserve(ds, ds->length + needed);
va_copy(args, args_);