Remove useless check of operation list
authorJacob Bachmeyer <jcb@gnu.org>
Sat, 29 Oct 2022 04:28:14 +0000 (23:28 -0500)
committerJacob Bachmeyer <jcb@gnu.org>
Sat, 29 Oct 2022 04:28:14 +0000 (23:28 -0500)
The interpret_directive function either returns an operation list or
throws an exception, so testing the returned value is silly.  This code
had been carried over from previous refactoring when the return value of
read_directive_file was changed to an operation list; it had been a flag
nominally, but was actually a constant in read_directive_file.

gatekeeper.pl

index f02b8b683957d58fa2dba20a52b76140754e181d..41229d29f057e5a778c593d549e6fb099f5c30b5 100755 (executable)
@@ -2440,17 +2440,16 @@ foreach my $packet (@packets) { # each list element is an array reference
 
     check_replay($oplist, $sig_info->{sig_creation});
 
-    if ($oplist) {
-      # do the work
-      execute_commands($oplist);
+    # do the work
+    execute_commands($oplist);
 
-      # report success
-      if (!$directive_only) {
-       success_upload($sig_file, $upload_file, $directive_file);
-      } else {
-       success_directive($directive_file);
-      }
+    # report success
+    if (!$directive_only) {
+      success_upload($sig_file, $upload_file, $directive_file);
+    } else {
+      success_directive($directive_file);
     }
+
     $complete = 1;
   };