From eded49d9cd48777495c4ab5ce7b9935547a0036e Mon Sep 17 00:00:00 2001 From: Jacob Bachmeyer Date: Fri, 11 Nov 2022 23:14:15 -0600 Subject: [PATCH] Simplify return sequence in signature verification --- gatekeeper.pl | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/gatekeeper.pl b/gatekeeper.pl index f61f011..949c278 100755 --- a/gatekeeper.pl +++ b/gatekeeper.pl @@ -1059,13 +1059,9 @@ sub verify_clearsigned_message { close $gpgv_log; close $gpgv_status; waitpid $pid, 0; # reap child that ran gpgv - # Prepare the return structure - my %ret = (exitcode => $?, raw_output => $raw_output, - raw_log => $raw_log, raw_status => $raw_status); - - _analyze_gpgv_output(\%ret); - - return \%ret; + return _analyze_gpgv_output + ({exitcode => $?, raw_output => $raw_output, + raw_log => $raw_log, raw_status => $raw_status}); } sub verify_detached_signature { @@ -1119,14 +1115,9 @@ sub verify_detached_signature { close $gpgv_output; close $gpgv_log; close $gpgv_status; waitpid $pid, 0; # reap child that ran gpgv - # Prepare the return structure - my %ret = (exitcode => $?, raw_output => $raw_output, - raw_log => $raw_log, raw_status => $raw_status); - - _analyze_gpgv_output(\%ret); - - return \%ret; - + return _analyze_gpgv_output + ({exitcode => $?, raw_output => $raw_output, + raw_log => $raw_log, raw_status => $raw_status}); } -- 2.25.1