libblkid/whereis: simplify some conditions [cppcheck]
[misc-utils/whereis.c:466]: (style) Redundant condition: uflag. 'A && (!A || B)' is equivalent to 'A || B' [libblkid/src/tag.c:373]: (style) Redundant condition: dev. 'A && (!A || B)' is equivalent to 'A || B' Signed-off-by: Boris Egorov <egorov@linux.com>
This commit is contained in:
parent
e3ca1312a2
commit
7508d991c5
|
@ -370,7 +370,7 @@ try_again:
|
|||
}
|
||||
if (dev && !(dev->bid_flags & BLKID_BID_FL_VERIFIED)) {
|
||||
dev = blkid_verify(cache, dev);
|
||||
if (!dev || (dev && (dev->bid_flags & BLKID_BID_FL_VERIFIED)))
|
||||
if (!dev || dev->bid_flags & BLKID_BID_FL_VERIFIED)
|
||||
goto try_again;
|
||||
}
|
||||
|
||||
|
|
|
@ -463,7 +463,7 @@ static void lookup(const char *pattern, struct wh_dirlist *ls, int want)
|
|||
|
||||
free(wait);
|
||||
|
||||
if (!uflag || (uflag && count > 1))
|
||||
if (!uflag || count > 1)
|
||||
putchar('\n');
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue