summaryrefslogtreecommitdiffstats
path: root/g10/parse-packet.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2016-01-06 08:45:01 +0100
committerWerner Koch <wk@gnupg.org>2016-01-06 08:45:01 +0100
commit09accc0e3d74e6289bed40b5bfc6479981cabfe4 (patch)
tree8c459be635e6782bbefd4adf5d0d15345797c324 /g10/parse-packet.c
parentgpg: Comment on false positives by static analyzers. (diff)
downloadgnupg2-09accc0e3d74e6289bed40b5bfc6479981cabfe4.tar.xz
gnupg2-09accc0e3d74e6289bed40b5bfc6479981cabfe4.zip
gpg: Silence warnings found by static analyzer.
* g10/keyedit.c (change_passphrase): Remove useless init of ANY. (keyedit_quick_adduid): Remove useless setting of ERR. * g10/parse-packet.c (parse_key): Remove PKTLEN from condition because it has been checked before the loop. (parse_plaintext): Remove useless init of PKTLEN. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'g10/parse-packet.c')
-rw-r--r--g10/parse-packet.c3
1 files changed, 1 insertions, 2 deletions
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)
{