]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
journal-remote: reduce scope of variable
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 21 Oct 2019 17:43:07 +0000 (19:43 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 21 Oct 2019 19:12:42 +0000 (21:12 +0200)
https://github.com/systemd/systemd/pull/11953/files#r264188513

src/journal-remote/journal-remote-main.c

index 329505cd2c109159c7447af430c1e97c3f9ea0a8..ac2bf648d2af08173d714928fed15c1764859f10 100644 (file)
@@ -266,7 +266,6 @@ static int request_handler(
         int r, code, fd;
         _cleanup_free_ char *hostname = NULL;
         bool chunked = false;
-        size_t len;
 
         assert(connection);
         assert(connection_cls);
@@ -302,6 +301,8 @@ static int request_handler(
 
         header = MHD_lookup_connection_value(connection, MHD_HEADER_KIND, "Content-Length");
         if (header) {
+                size_t len;
+
                 if (chunked)
                         return mhd_respond(connection, MHD_HTTP_BAD_REQUEST,
                                            "Content-Length must not specified when Transfer-Encoding type is 'chuncked'");