summaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-07-28 10:22:10 -0400
committerNick Mathewson <nickm@torproject.org>2016-07-28 10:22:10 -0400
commit9fe6fea1cceb39fc415ad813020bbd863121e0c9 (patch)
tree0437c4df402c6b7128d67e8c34d981bdd656b400 /src/or/config.c
parent0390e1a60cb91fa581ec568879bf300224db6322 (diff)
downloadtor-9fe6fea1cceb39fc415ad813020bbd863121e0c9.tar.gz
tor-9fe6fea1cceb39fc415ad813020bbd863121e0c9.zip
Fix a huge pile of -Wshadow warnings.
These appeared on some of the Jenkins platforms. Apparently some GCCs care when you shadow globals, and some don't.
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/or/config.c b/src/or/config.c
index fb2ab5ae1b..64c9796792 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -5073,7 +5073,7 @@ options_init_logs(const or_options_t *old_options, or_options_t *options,
config_line_t *opt;
int ok;
smartlist_t *elts;
- int daemon =
+ int run_as_daemon =
#ifdef _WIN32
0;
#else
@@ -5134,7 +5134,7 @@ options_init_logs(const or_options_t *old_options, or_options_t *options,
int err = smartlist_len(elts) &&
!strcasecmp(smartlist_get(elts,0), "stderr");
if (!validate_only) {
- if (daemon) {
+ if (run_as_daemon) {
log_warn(LD_CONFIG,
"Can't log to %s with RunAsDaemon set; skipping stdout",
err?"stderr":"stdout");
@@ -5163,19 +5163,19 @@ options_init_logs(const or_options_t *old_options, or_options_t *options,
char *fname = expand_filename(smartlist_get(elts, 1));
/* Truncate if TruncateLogFile is set and we haven't seen this option
line before. */
- int truncate = 0;
+ int truncate_log = 0;
if (options->TruncateLogFile) {
- truncate = 1;
+ truncate_log = 1;
if (old_options) {
config_line_t *opt2;
for (opt2 = old_options->Logs; opt2; opt2 = opt2->next)
if (!strcmp(opt->value, opt2->value)) {
- truncate = 0;
+ truncate_log = 0;
break;
}
}
}
- if (add_file_log(severity, fname, truncate) < 0) {
+ if (add_file_log(severity, fname, truncate_log) < 0) {
log_warn(LD_CONFIG, "Couldn't open file for 'Log %s': %s",
opt->value, strerror(errno));
ok = 0;