]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
runtests: fix Perl warning after recent patch
authorViktor Szakats <commit@vsz.me>
Sun, 2 Nov 2025 03:45:05 +0000 (04:45 +0100)
committerViktor Szakats <commit@vsz.me>
Sun, 2 Nov 2025 12:09:16 +0000 (13:09 +0100)
```
Use of uninitialized value $hash{"crlf"} in string eq at tests/runtests.pl line 1406.
```

Follow-up to 6cf3d7b1b161bc45501d17b401225befe3c43943 #19318
Closes #19327

tests/runtests.pl

index bb881d987d5491e654309fb93690b03df73a27cb..5fd9819b17729bde15fa50f91c9e3007586cb352 100755 (executable)
@@ -1403,11 +1403,13 @@ sub singletest_check {
             }
         }
 
-        if($hash{'crlf'} eq "headers") {
-            subnewlines(0, \$_) for @protocol;
-        }
-        elsif($hash{'crlf'}) {
-            subnewlines(1, \$_) for @protocol;
+        if($hash{'crlf'}) {
+            if($hash{'crlf'} eq "headers") {
+                subnewlines(0, \$_) for @protocol;
+            }
+            else {
+                subnewlines(1, \$_) for @protocol;
+            }
         }
 
         if((!$out[0] || ($out[0] eq "")) && $protocol[0]) {