Move declaration of counter in read_directive_file nearer to loop
authorJacob Bachmeyer <jcb@gnu.org>
Sun, 16 Oct 2022 04:24:00 +0000 (23:24 -0500)
committerJacob Bachmeyer <jcb@gnu.org>
Sun, 16 Oct 2022 04:24:00 +0000 (23:24 -0500)
gatekeeper.pl

index f4d3d0bb6c7a4934bc86a50b2bf3424144743412..0988f1d26f0c7c9016611f8b4a2f776de23e4c80 100755 (executable)
@@ -1278,7 +1278,6 @@ sub read_directive_file {
 
   open (DIRECTIVE_FILE, "<", $directive_file)
     or ftp_abort("FATAL: open($directive_file) failed: $!");
-  my $cnt = 0; # Keep track of the order of directives...
   $directive_file_contents = join('', (@lines = <DIRECTIVE_FILE>));
   close (DIRECTIVE_FILE) or ftp_warn("close($directive_file) failed: $!");
 
@@ -1299,6 +1298,7 @@ sub read_directive_file {
   push(@{$info{email}},$1)
     if ($tmp_retval =~ /Good signature from .*?<(.*?)>/);
 
+  my $cnt = 0; # Keep track of the order of directives...
   my $signed = 0;
   # If there is a command in the directive that doesn't require an actual
   # file to work on, we won't require the filename line in the directive