]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
runtests: fix "uninitialized value $port"
authorDaniel Stenberg <daniel@haxx.se>
Wed, 15 Feb 2023 12:03:21 +0000 (13:03 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 15 Feb 2023 15:09:05 +0000 (16:09 +0100)
by using a more appropriate variable

Reported-by: fundawang on github
Fixes #10518
Closes #10520

tests/runtests.pl

index 71644ad18e8556083a84bb05d8d27f576ec5f832..5cd87897a393c8045485f8dd88fca7cd7498bf1b 100755 (executable)
@@ -1740,7 +1740,7 @@ sub runhttpserver {
     }
 
     # where is it?
-    my $port;
+    my $port = 0;
     if(!$port_or_path) {
         $port = $port_or_path = pidfromfile($portfile);
     }
@@ -1758,7 +1758,7 @@ sub runhttpserver {
     $pid2 = $pid3;
 
     if($verbose) {
-        logmsg "RUN: $srvrname server is on PID $httppid port $port\n";
+        logmsg "RUN: $srvrname server is on PID $httppid port $port_or_path\n";
     }
 
     return ($httppid, $pid2, $port);