git-cvsserver: indent & clean up authdb code
[gitweb.git] / git-cvsserver.perl
index 8b97fb80cf8bd231bd4f278bf60793dda942d596..ed1d5b9d6010797e507ebebce08dd9ed9a0a3b59 100755 (executable)
             print "I HATE YOU\n";
             exit 1;
         }
-       my $auth_ok;
-       open PASSWD, "<$cfg->{gitcvs}->{authdb}" or die $!;
-       while(<PASSWD>) {
-           if (m{^\Q$user\E:(.*)}) {
-               if (crypt($user, $1) eq $1) {
-                   $auth_ok = 1;
-               }
-           };
-       }
-       unless ($auth_ok) {
+
+        my $auth_ok;
+        open my $passwd, "<", $cfg->{gitcvs}->{authdb} or die $!;
+        while (<$passwd>) {
+            if (m{^\Q$user\E:(.*)}) {
+                if (crypt($user, $1) eq $1) {
+                    $auth_ok = 1;
+                }
+            };
+        }
+        close $passwd;
+
+        unless ($auth_ok) {
             print "I HATE YOU\n";
             exit 1;
         }