]> git.mjollnir.org Git - tks.git/commitdiff
Some refactoring I missed, as pointed out by Martyn.
authorNigel McNie <nigel@catalyst.net.nz>
Thu, 12 Jun 2008 00:03:03 +0000 (12:03 +1200)
committerNigel McNie <nigel@catalyst.net.nz>
Thu, 12 Jun 2008 00:03:03 +0000 (12:03 +1200)
tks.pl

diff --git a/tks.pl b/tks.pl
index 6ed5c57e7656bbc9f59e2fe16fb644da08eac04c..c1a7eb37f7feb2111d842acee092380ec39023e1 100755 (executable)
--- a/tks.pl
+++ b/tks.pl
@@ -165,14 +165,12 @@ sub load_timesheet_file {
     }
 
     foreach my $date ( keys %{$result} ) {
-        my $found_error = 0;
         if ( my @errors = grep { $_->{needs_closing_time} } @{$result->{$date}} ) {
-            $found_error = 1;
             foreach my $error ( @errors ) {
                 print "Error on line ", $error->{linenumber}, ": no closing time found\n";
             }
+            exit 1;
         }
-        exit 1 if $found_error;
     }
 
     return $result;