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:
@@ -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_);
|
||||
|
||||
Reference in New Issue
Block a user