From 18920d8a2735d4288ef9006331bea336755bfb99 Mon Sep 17 00:00:00 2001 From: Jacob Bachmeyer Date: Fri, 28 Oct 2022 23:28:14 -0500 Subject: [PATCH] Remove useless check of operation list 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 | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/gatekeeper.pl b/gatekeeper.pl index f02b8b6..41229d2 100755 --- a/gatekeeper.pl +++ b/gatekeeper.pl @@ -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; }; -- 2.25.1