gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnurl] 96/150: hostip: fix 'potentially uninitialized vari


From: gnunet
Subject: [GNUnet-SVN] [gnurl] 96/150: hostip: fix 'potentially uninitialized variable' warning
Date: Fri, 30 Mar 2018 16:49:10 +0200

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

ng0 pushed a commit to branch master
in repository gnurl.

commit 73050fb6ae3c58b6e5d085e8463d94b79dbf2737
Author: Jay Satiro <address@hidden>
AuthorDate: Tue Feb 20 14:29:50 2018 -0500

    hostip: fix 'potentially uninitialized variable' warning
    
    Follow-up to 50d1b33.
    
    Caught by AppVeyor.
---
 lib/hostip.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/hostip.c b/lib/hostip.c
index 8310c83e1..895c13294 100644
--- a/lib/hostip.c
+++ b/lib/hostip.c
@@ -823,7 +823,7 @@ CURLcode Curl_loadhostpairs(struct Curl_easy *data)
       char *entry_id;
       size_t entry_len;
       char address[64];
-      char *addresses;
+      char *addresses = NULL;
       char *addr_begin;
       char *addr_end;
       char *port_ptr;
@@ -842,7 +842,7 @@ CURLcode Curl_loadhostpairs(struct Curl_easy *data)
 
       port_ptr = host_end + 1;
       tmp_port = strtoul(port_ptr, &end_ptr, 10);
-      if(end_ptr == port_ptr || tmp_port > USHRT_MAX || *end_ptr != ':')
+      if(tmp_port > USHRT_MAX || end_ptr == port_ptr || *end_ptr != ':')
         goto err;
 
       port = (int)tmp_port;

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



reply via email to

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