summaryrefslogtreecommitdiffstats
path: root/agent
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2015-03-15 12:57:13 +0100
committerWerner Koch <wk@gnupg.org>2015-03-15 12:59:17 +0100
commit95415bdec77a608e6052ba3e2a5d857a8e8f7689 (patch)
treeba54b6941c5bfb637bd7389dc2f76626e58e35f6 /agent
parentgpg: Remove useless condition. (diff)
downloadgnupg2-95415bdec77a608e6052ba3e2a5d857a8e8f7689.tar.xz
gnupg2-95415bdec77a608e6052ba3e2a5d857a8e8f7689.zip
agent: Remove useless conditions.
* agent/genkey.c (agent_ask_new_passphrase): Remove useless condition. * agent/command-ssh.c (ssh_identity_register): Ditto. -- Detected by Stack 0.3: bug: anti-simplify model: | %tobool22 = icmp ne i8* %arraydecay21, null, !dbg !717 --> true stack: - /home/wk/s/gnupg/agent/genkey.c:385:0 ncore: 1 core: - /home/wk/s/gnupg/agent/genkey.c:362:0 - pointer overflow bug: anti-simplify model: | %tobool35 = icmp ne i8* %arraydecay34, null, !dbg !1053 --> true stack: - /home/wk/s/gnupg/agent/command-ssh.c:3120:0 ncore: 1 core: - /home/wk/s/gnupg/agent/command-ssh.c:3103:0 - pointer overflow
Diffstat (limited to 'agent')
-rw-r--r--agent/command-ssh.c2
-rw-r--r--agent/genkey.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/agent/command-ssh.c b/agent/command-ssh.c
index 51d2c5404..2b5120763 100644
--- a/agent/command-ssh.c
+++ b/agent/command-ssh.c
@@ -3117,7 +3117,7 @@ ssh_identity_register (ctrl_t ctrl, ssh_key_type_spec_t *spec,
/* Unless the passphrase is empty or the pinentry told us that
it already did the repetition check, ask to confirm it. */
- if (pi->pin && *pi->pin && !pi->repeat_okay)
+ if (*pi->pin && !pi->repeat_okay)
{
err = agent_askpin (ctrl, description2, NULL, NULL, pi2);
if (err == -1)
diff --git a/agent/genkey.c b/agent/genkey.c
index d7b6007bf..ecf676eff 100644
--- a/agent/genkey.c
+++ b/agent/genkey.c
@@ -382,7 +382,7 @@ agent_ask_new_passphrase (ctrl_t ctrl, const char *prompt,
}
/* Unless the passphrase is empty or the pinentry told us that
it already did the repetition check, ask to confirm it. */
- if (pi->pin && *pi->pin && !pi->repeat_okay)
+ if (*pi->pin && !pi->repeat_okay)
{
err = agent_askpin (ctrl, text2, NULL, NULL, pi2);
if (err == -1)