diff options
author | Werner Koch <wk@gnupg.org> | 2017-01-05 20:42:55 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2017-01-05 20:43:40 +0100 |
commit | 6170eb809033c9d144abf3b1f31f8b936878cdd4 (patch) | |
tree | 752af916a5a523ebf2326cbcf67320e59ae532b7 /common/tlv.c | |
parent | doc: Mention gpgv in the description of gpg --verify. (diff) | |
download | gnupg2-6170eb809033c9d144abf3b1f31f8b936878cdd4.tar.xz gnupg2-6170eb809033c9d144abf3b1f31f8b936878cdd4.zip |
Silence two -Wlogical-op warnings.
* common/tlv.c (parse_ber_header): Avoid compiler warning about a
duplicate condition.
* tools/gpgtar-create.c (pattern_valid_p): Likewise.
Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'common/tlv.c')
-rw-r--r-- | common/tlv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/tlv.c b/common/tlv.c index 6813c585a..0058b67ca 100644 --- a/common/tlv.c +++ b/common/tlv.c @@ -214,9 +214,9 @@ parse_ber_header (unsigned char const **buffer, size_t *size, else { unsigned long len = 0; - int count = c & 0x7f; + int count = (c & 0x7f); - if (count > sizeof (len) || count > sizeof (size_t)) + if (count > (sizeof(len)<sizeof(size_t)?sizeof(len):sizeof(size_t))) return gpg_err_make (default_errsource, GPG_ERR_BAD_BER); for (; count; count--) |