summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2012-10-13 13:08:17 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2012-10-13 14:54:56 +0200
commit6374a73b007dfb03a738d6389ca34acd924f0379 (patch)
tree6204dde34b9a4eaf92703f285c7b5850a5a1eea7 /src
parente88baee88fad8bc59d33b55a7a2d640ef9e16cd6 (diff)
journal-gatewayd: rename variables to avoid -Wshadow warning
Diffstat (limited to 'src')
-rw-r--r--src/journal/journal-gatewayd.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/journal/journal-gatewayd.c b/src/journal/journal-gatewayd.c
index b2d4abf4fe..eea3530733 100644
--- a/src/journal/journal-gatewayd.c
+++ b/src/journal/journal-gatewayd.c
@@ -276,20 +276,20 @@ static int request_parse_accept(
RequestMeta *m,
struct MHD_Connection *connection) {
- const char *accept;
+ const char *header;
assert(m);
assert(connection);
- accept = MHD_lookup_connection_value(connection, MHD_HEADER_KIND, "Accept");
- if (!accept)
+ header = MHD_lookup_connection_value(connection, MHD_HEADER_KIND, "Accept");
+ if (!header)
return 0;
- if (streq(accept, mime_types[OUTPUT_JSON]))
+ if (streq(header, mime_types[OUTPUT_JSON]))
m->mode = OUTPUT_JSON;
- else if (streq(accept, mime_types[OUTPUT_JSON_SSE]))
+ else if (streq(header, mime_types[OUTPUT_JSON_SSE]))
m->mode = OUTPUT_JSON_SSE;
- else if (streq(accept, mime_types[OUTPUT_EXPORT]))
+ else if (streq(header, mime_types[OUTPUT_EXPORT]))
m->mode = OUTPUT_EXPORT;
else
m->mode = OUTPUT_SHORT;
@@ -676,7 +676,7 @@ static int request_handler(
}
int main(int argc, char *argv[]) {
- struct MHD_Daemon *daemon = NULL;
+ struct MHD_Daemon *d = NULL;
int r = EXIT_FAILURE, n;
if (argc > 1) {
@@ -696,7 +696,7 @@ int main(int argc, char *argv[]) {
log_error("Can't listen on more than one socket.");
goto finish;
} else if (n > 0) {
- daemon = MHD_start_daemon(
+ d = MHD_start_daemon(
MHD_USE_THREAD_PER_CONNECTION|MHD_USE_POLL|MHD_USE_DEBUG,
19531,
NULL, NULL,
@@ -705,7 +705,7 @@ int main(int argc, char *argv[]) {
MHD_OPTION_NOTIFY_COMPLETED, request_meta_free, NULL,
MHD_OPTION_END);
} else {
- daemon = MHD_start_daemon(
+ d = MHD_start_daemon(
MHD_USE_DEBUG|MHD_USE_THREAD_PER_CONNECTION|MHD_USE_POLL,
19531,
NULL, NULL,
@@ -714,7 +714,7 @@ int main(int argc, char *argv[]) {
MHD_OPTION_END);
}
- if (!daemon) {
+ if (!d) {
log_error("Failed to start daemon!");
goto finish;
}
@@ -724,8 +724,8 @@ int main(int argc, char *argv[]) {
r = EXIT_SUCCESS;
finish:
- if (daemon)
- MHD_stop_daemon(daemon);
+ if (d)
+ MHD_stop_daemon(d);
return r;
}