aboutsummaryrefslogtreecommitdiffstats
path: root/agent/command.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2017-07-28 08:37:33 +0000
committerWerner Koch <[email protected]>2017-07-28 08:38:57 +0000
commit5516ef47a22dfdf9cdf56107f34d2bda9e46deec (patch)
treec74f181b797321b36c07f2d6658f43d21171b44f /agent/command.c
parentgpg: Tweak compliance checking for verification (diff)
downloadgnupg-5516ef47a22dfdf9cdf56107f34d2bda9e46deec.tar.gz
gnupg-5516ef47a22dfdf9cdf56107f34d2bda9e46deec.zip
agent: Minor cleanup (mostly for documentation).
* agent/command.c (cmd_pksign): Change var name 'rc' to 'err'. * agent/findkey.c (read_key_file): Ditto. Change return type to gpg_error_t. On es_fessk failure return a correct error code. (agent_key_from_file): Change var name 'rc' to 'err'. * agent/pksign.c (agent_pksign_do): Ditto. Change return type to gpg_error_t. Return a valid erro code on malloc failure. (agent_pksign): Ditto. Change return type to gpg_error_t. replace xmalloc by xtrymalloc. * agent/protect.c (calculate_mic): Change return type to gpg_error_t. (do_decryption): Ditto. Do not init RC. (merge_lists): Change return type to gpg_error_t. (agent_unprotect): Ditto. (agent_get_shadow_info): Ditto. -- While code starring for bug 3266 I found two glitches and also changed var name for easier reading. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'agent/command.c')
-rw-r--r--agent/command.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/agent/command.c b/agent/command.c
index e387db549..f2a668306 100644
--- a/agent/command.c
+++ b/agent/command.c
@@ -782,7 +782,7 @@ static const char hlp_pksign[] =
static gpg_error_t
cmd_pksign (assuan_context_t ctx, char *line)
{
- int rc;
+ gpg_error_t err;
cache_mode_t cache_mode = CACHE_MODE_NORMAL;
ctrl_t ctrl = assuan_get_pointer (ctx);
membuf_t outbuf;
@@ -804,17 +804,17 @@ cmd_pksign (assuan_context_t ctx, char *line)
init_membuf (&outbuf, 512);
- rc = agent_pksign (ctrl, cache_nonce, ctrl->server_local->keydesc,
- &outbuf, cache_mode);
- if (rc)
+ err = agent_pksign (ctrl, cache_nonce, ctrl->server_local->keydesc,
+ &outbuf, cache_mode);
+ if (err)
clear_outbuf (&outbuf);
else
- rc = write_and_clear_outbuf (ctx, &outbuf);
+ err = write_and_clear_outbuf (ctx, &outbuf);
xfree (cache_nonce);
xfree (ctrl->server_local->keydesc);
ctrl->server_local->keydesc = NULL;
- return leave_cmd (ctx, rc);
+ return leave_cmd (ctx, err);
}