]> granicus.if.org Git - curl/commitdiff
checksrc: fix uninitialized variable warning
authorMarcel Raad <Marcel.Raad@teamviewer.com>
Mon, 30 Sep 2019 22:32:26 +0000 (00:32 +0200)
committerMarcel Raad <Marcel.Raad@teamviewer.com>
Tue, 1 Oct 2019 08:47:45 +0000 (10:47 +0200)
The loop doesn't need to be executed without a file argument.

Closes https://github.com/curl/curl/pull/4444

lib/checksrc.pl

index 965f0bab1d354d7cc9f46f9e1680db2090b2ff36..b2cfa835592435c773c384e6da07353364c6d0db 100755 (executable)
@@ -176,7 +176,7 @@ sub checkwarn {
 
 $file = shift @ARGV;
 
-while(1) {
+while(defined $file) {
 
     if($file =~ /-D(.*)/) {
         $dir = $1;