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/process.c | |
parent | 1089aab7136612acb86cdcd638d7d2261311531a (diff) |
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/process.c')
-rw-r--r-- | lib/process.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/process.c b/lib/process.c index a201a88f..377c396b 100644 --- a/lib/process.c +++ b/lib/process.c @@ -517,7 +517,7 @@ process_run_capture(char **argv, char **stdout_log, char **stderr_log, block_sigchld(&oldsigs); pid = fork(); if (pid < 0) { - int error = errno; + error = errno; unblock_sigchld(&oldsigs); VLOG_WARN("fork failed: %s", strerror(error)); |