summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--g10/keyedit.c4
-rw-r--r--g10/parse-packet.c3
2 files changed, 3 insertions, 4 deletions
diff --git a/g10/keyedit.c b/g10/keyedit.c
index 1c302b7ab..497fd1b6c 100644
--- a/g10/keyedit.c
+++ b/g10/keyedit.c
@@ -1195,7 +1195,7 @@ change_passphrase (ctrl_t ctrl, kbnode_t keyblock)
}
/* Change the passphrase for all keys. */
- for (any = 0, node = keyblock; node; node = node->next)
+ for (node = keyblock; node; node = node->next)
{
if (node->pkt->pkttype == PKT_PUBLIC_KEY
|| node->pkt->pkttype == PKT_PUBLIC_SUBKEY)
@@ -2391,7 +2391,7 @@ keyedit_quick_adduid (ctrl_t ctrl, const char *username, const char *newuid)
kdbhd = keydb_new ();
if (!kdbhd)
{
- err = gpg_error_from_syserror ();
+ /* Note that keydb_new has already used log_error. */
goto leave;
}
diff --git a/g10/parse-packet.c b/g10/parse-packet.c
index d552fa6ba..b0c6ee513 100644
--- a/g10/parse-packet.c
+++ b/g10/parse-packet.c
@@ -2428,7 +2428,7 @@ parse_key (IOBUF inp, int pkttype, unsigned long pktlen,
err = gpg_error (GPG_ERR_INV_PACKET);
goto leave;
}
- for (i = 0; i < ski->ivlen && pktlen; i++, pktlen--)
+ for (i = 0; i < ski->ivlen; i++, pktlen--)
temp[i] = iobuf_get_noeof (inp);
if (list_mode)
{
@@ -2862,7 +2862,6 @@ parse_plaintext (IOBUF inp, int pkttype, unsigned long pktlen,
pktlen -= 4;
pt->len = pktlen;
pt->buf = inp;
- pktlen = 0;
if (list_mode)
{