mirror of
https://git.FreeBSD.org/src.git
synced 2024-11-29 08:08:37 +00:00
Fix a clang 3.8.0 warning in pflogd.c:
contrib/pf/pflogd/pflogd.c:769:8: error: logical not is only applied to the left hand side of this comparison [-Werror,-Wlogical-not-parentheses] if (!if_exists(interface) == -1) { ^ ~~ The if_exists() function does not return -1, and even if it did, it would not be the correct way to check. Just ditch the == -1 instead. Obtained from: OpenBSD's pflogd.c 1.49 MFC after: 3 days
This commit is contained in:
parent
79f08b9adf
commit
f7862a87d0
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/projects/clang380-import/; revision=293013
@ -766,7 +766,7 @@ main(int argc, char **argv)
|
||||
np = pcap_dispatch(hpcap, PCAP_NUM_PKTS,
|
||||
phandler, (u_char *)dpcap);
|
||||
if (np < 0) {
|
||||
if (!if_exists(interface) == -1) {
|
||||
if (!if_exists(interface)) {
|
||||
logmsg(LOG_NOTICE, "interface %s went away",
|
||||
interface);
|
||||
ret = -1;
|
||||
|
Loading…
Reference in New Issue
Block a user