Skip to content

Commit e7e1996

Browse files
committed
fix some warnings
1 parent 9329129 commit e7e1996

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/librepgp/stream-packet.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -1134,7 +1134,7 @@ pgp_pk_sesskey_t::parse(pgp_source_t &src)
11341134
return RNP_ERROR_BAD_FORMAT;
11351135
}
11361136
fp.length = fp_len;
1137-
if (fp.length && (fp.length != fp_and_key_ver_len - 1)) {
1137+
if (fp.length && (fp.length != (unsigned)(fp_and_key_ver_len - 1))) {
11381138
RNP_LOG("size mismatch (fingerprint size and fp+key version length field)");
11391139
return RNP_ERROR_BAD_FORMAT;
11401140
}
@@ -1245,7 +1245,7 @@ pgp_pk_sesskey_t::parse_material(pgp_encrypted_material_t &material)
12451245
if ((version == PGP_PKSK_V3) && !do_encrypt_pkesk_v3_alg_id(alg)) {
12461246
if (!pkt.get(bt)) {
12471247
RNP_LOG("failed to get salg");
1248-
return RNP_ERROR_BAD_FORMAT;
1248+
return false;
12491249
}
12501250
enc_sesskey_len -= 1;
12511251
salg = (pgp_symm_alg_t) bt;
@@ -1286,7 +1286,7 @@ pgp_pk_sesskey_t::parse_material(pgp_encrypted_material_t &material)
12861286
if ((version == PGP_PKSK_V3) && !do_encrypt_pkesk_v3_alg_id(alg)) {
12871287
if (!pkt.get(bt)) {
12881288
RNP_LOG("failed to get salg");
1289-
return RNP_ERROR_BAD_FORMAT;
1289+
return false;
12901290
}
12911291
salg = (pgp_symm_alg_t) bt;
12921292
wrapped_key_len--;

0 commit comments

Comments
 (0)