]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
runtests: fix warning about using an undefined variable
authorDaniel Stenberg <daniel@haxx.se>
Wed, 8 Apr 2020 14:40:25 +0000 (16:40 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 9 Apr 2020 07:45:52 +0000 (09:45 +0200)
Follow-up from 4d939ef6ceb2db1

tests/runtests.pl

index 7957595444ef4266d9c7cb42fe6a0fb738ee962d..36f39a7b76baa156331e5d12c26195a81a9b3595 100755 (executable)
@@ -4122,10 +4122,10 @@ sub singletest {
             }
         }
 
-        if(($out[0] eq "") && $protstrip[0]) {
+        if((!$out[0] || ($out[0] eq "")) && $protstrip[0]) {
             logmsg "\n $testnum: protocol FAILED!\n".
                 " There was no content at all in the file $SERVERIN.\n".
-                " Server glitch? Total curl failure?\n";
+                " Server glitch? Total curl failure? Returned: $cmdres\n";
             return $errorreturncode;
         }