From: Daniel Stenberg Date: Wed, 15 Feb 2023 12:03:21 +0000 (+0100) Subject: runtests: fix "uninitialized value $port" X-Git-Tag: curl-7_88_1~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f1d09231adfc695d15995b9ef2c8c6e568c28091;p=thirdparty%2Fcurl.git runtests: fix "uninitialized value $port" by using a more appropriate variable Reported-by: fundawang on github Fixes #10518 Closes #10520 --- diff --git a/tests/runtests.pl b/tests/runtests.pl index 71644ad18e..5cd87897a3 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -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);