]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tests: Fix uninitialized value warning
authorDan Fandrich <dan@coneharvesters.com>
Wed, 17 Apr 2024 02:50:13 +0000 (19:50 -0700)
committerDan Fandrich <dan@coneharvesters.com>
Wed, 17 Apr 2024 02:53:22 +0000 (19:53 -0700)
The check for an option must be predicated on options existing at all.

Follow-up to f7cc9e91

tests/runner.pm

index d02d40b7b449bac239bde3a4b2a0114b9dfb1348..a6a26c9d048f985887255b00a06dc2113938bf8a 100644 (file)
@@ -920,7 +920,7 @@ sub singletest_run {
 
     if(!$tool) {
         $CMDLINE=shell_quote($CURL);
-        if($cmdhash{'option'} !~ /no-q/) {
+        if((!$cmdhash{'option'}) || ($cmdhash{'option'} !~ /no-q/)) {
             $CMDLINE .= " -q";
         }
     }