From: Jacob Bachmeyer Date: Sat, 12 Nov 2022 05:14:15 +0000 (-0600) Subject: Simplify return sequence in signature verification X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=eded49d9cd48777495c4ab5ce7b9935547a0036e;p=gatekeeper.git Simplify return sequence in signature verification --- 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}); }