gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [libmicrohttpd] 02/02: Narrow scope of variable to succeed


From: gnunet
Subject: [GNUnet-SVN] [libmicrohttpd] 02/02: Narrow scope of variable to succeed scan-build
Date: Sun, 14 Apr 2019 19:08:16 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository libmicrohttpd.

commit 3ab54c6b3b03a23b5bb67085b91c3b5af56aed83
Author: Tim Rühsen <address@hidden>
AuthorDate: Sun Apr 14 18:14:23 2019 +0200

    Narrow scope of variable to succeed scan-build
---
 src/microhttpd/connection.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 4fe66805..8b136b83 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -2272,7 +2272,6 @@ parse_initial_message_line (struct MHD_Connection 
*connection,
   char *http_version;
   char *args;
   unsigned int unused_num_headers;
-  size_t uri_len;
 
   if (NULL == (uri = memchr (line,
                              ' ',
@@ -2290,13 +2289,13 @@ parse_initial_message_line (struct MHD_Connection 
*connection,
     {
       /* No URI and no http version given */
       curi = "";
-      uri_len = 0;
       uri = NULL;
       connection->version = "";
       args = NULL;
     }
   else
     {
+      size_t uri_len;
       curi = uri;
       /* Search from back to accept misformed URI with space */
       http_version = line + line_len - 1;
@@ -2344,7 +2343,7 @@ parse_initial_message_line (struct MHD_Connection 
*connection,
                                    uri,
                                     connection);
     }
-  
+
   if (NULL != args)
     {
       args[0] = '\0';
@@ -2356,7 +2355,7 @@ parse_initial_message_line (struct MHD_Connection 
*connection,
                            &connection_add_header,
                            &unused_num_headers);
     }
-  
+
   /* unescape URI *after* searching for arguments and log callback */
   if (NULL != uri)
     daemon->unescape_callback (daemon->unescape_callback_cls,

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]