[Pkg-gnupg-commit] [gnupg2] 73/132: agent: Clean up error initialize/return.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Wed May 17 03:07:43 UTC 2017
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch experimental
in repository gnupg2.
commit 36c4e540f1a4992675ee6e0acca1231325457079
Author: NIIBE Yutaka <gniibe at fsij.org>
Date: Fri Apr 14 12:54:06 2017 +0900
agent: Clean up error initialize/return.
* agent/call-pinentry.c (start_pinentry): Return RC.
* agent/command-ssh.c (ssh_handler_request_identities): Don't set ERR.
* agent/findkey.c (try_unprotect_cb): Return ERR.
(unprotect): Don't set RC.
* agent/gpg-agent.c (handle_connections): Don't set fd.
Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>
---
agent/call-pinentry.c | 2 +-
agent/command-ssh.c | 1 -
agent/findkey.c | 4 +---
agent/gpg-agent.c | 1 -
4 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/agent/call-pinentry.c b/agent/call-pinentry.c
index a35a3fb..6524cb1 100644
--- a/agent/call-pinentry.c
+++ b/agent/call-pinentry.c
@@ -654,7 +654,7 @@ start_pinentry (ctrl_t ctrl)
xfree (flavor_version);
- return 0;
+ return rc;
}
diff --git a/agent/command-ssh.c b/agent/command-ssh.c
index eeb1498..5c7cf1f 100644
--- a/agent/command-ssh.c
+++ b/agent/command-ssh.c
@@ -2576,7 +2576,6 @@ ssh_handler_request_identities (ctrl_t ctrl,
key_public = NULL;
key_counter = 0;
- err = 0;
key_blobs = es_fopenmem (0, "r+b");
if (! key_blobs)
diff --git a/agent/findkey.c b/agent/findkey.c
index 0b2ddf1..f3c8ca9 100644
--- a/agent/findkey.c
+++ b/agent/findkey.c
@@ -328,7 +328,7 @@ try_unprotect_cb (struct pin_entry_info_s *pi)
xfree (desc);
}
- return 0;
+ return err;
}
@@ -552,7 +552,6 @@ unprotect (ctrl_t ctrl, const char *cache_nonce, const char *desc_text,
return 0;
}
xfree (pw);
- rc = 0;
}
else if (cache_mode == CACHE_MODE_NORMAL)
{
@@ -590,7 +589,6 @@ unprotect (ctrl_t ctrl, const char *cache_nonce, const char *desc_text,
return 0;
}
xfree (pw);
- rc = 0;
}
}
diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c
index e23f438..c764be8 100644
--- a/agent/gpg-agent.c
+++ b/agent/gpg-agent.c
@@ -2964,7 +2964,6 @@ handle_connections (gnupg_fd_t listen_fd,
xfree (ctrl);
}
}
- fd = GNUPG_INVALID_FD;
}
}
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git
More information about the Pkg-gnupg-commit
mailing list