mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01:00
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>
This commit is contained in:
parent
353f6ff376
commit
6170eb8090
@ -214,9 +214,9 @@ parse_ber_header (unsigned char const **buffer, size_t *size,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
unsigned long len = 0;
|
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);
|
return gpg_err_make (default_errsource, GPG_ERR_BAD_BER);
|
||||||
|
|
||||||
for (; count; count--)
|
for (; count; count--)
|
||||||
|
@ -429,7 +429,11 @@ pattern_valid_p (const char *pattern)
|
|||||||
return 0;
|
return 0;
|
||||||
if (*pattern == '.' && pattern[1] == '.')
|
if (*pattern == '.' && pattern[1] == '.')
|
||||||
return 0;
|
return 0;
|
||||||
if (*pattern == '/' || *pattern == DIRSEP_C)
|
if (*pattern == '/'
|
||||||
|
#ifdef HAVE_DOSISH_SYSTEM
|
||||||
|
|| *pattern == '\\'
|
||||||
|
#endif
|
||||||
|
)
|
||||||
return 0; /* Absolute filenames are not supported. */
|
return 0; /* Absolute filenames are not supported. */
|
||||||
#ifdef HAVE_DRIVE_LETTERS
|
#ifdef HAVE_DRIVE_LETTERS
|
||||||
if (((*pattern >= 'a' && *pattern <= 'z')
|
if (((*pattern >= 'a' && *pattern <= 'z')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user