Simplify return sequence in signature verification
authorJacob Bachmeyer <jcb@gnu.org>
Sat, 12 Nov 2022 05:14:15 +0000 (23:14 -0600)
committerJacob Bachmeyer <jcb@gnu.org>
Sat, 12 Nov 2022 05:14:15 +0000 (23:14 -0600)
gatekeeper.pl

index f61f011c383201bec7340ec18247145d7f95862a..949c2788135083f5f5c13f52677251b8b4166c04 100755 (executable)
@@ -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});
 }
 
 \f