summaryrefslogtreecommitdiff
path: root/print-nflog.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2016-03-25 12:51:08 -0700
committerGuy Harris <guy@alum.mit.edu>2016-03-25 12:51:08 -0700
commit39e332e70d48995195d271cabd459894e4713d64 (patch)
treef4012277d86be2d9e80b5e6e145dd93c813dbbda /print-nflog.c
parent3d11d28ba07fffcbfd460cdb1fe95eded061e2f3 (diff)
downloadtcpdump-39e332e70d48995195d271cabd459894e4713d64.tar.gz
Clean up version test.
!(nfhdr->nflog_version) is equivalent to (nfhdr->nflog_version == 0). That will evaluate to 1 if nfhdr->nflog_version is 0 and to 0 otherwise. So !(nfhdr->nflog_version) == 0 is equivalent to nfhdr->nflog_version != 0, but 1) it's more obvious what it means and 2) compilers don't point out that it may not mean what you intended.
Diffstat (limited to 'print-nflog.c')
-rw-r--r--print-nflog.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/print-nflog.c b/print-nflog.c
index 2a42f537..0eefd342 100644
--- a/print-nflog.c
+++ b/print-nflog.c
@@ -80,7 +80,7 @@ nflog_if_print(netdissect_options *ndo,
return h_size;
}
- if (!(hdr->nflog_version) == 0) {
+ if (hdr->nflog_version != 0) {
ND_PRINT((ndo, "version %u (unknown)", hdr->nflog_version));
return h_size;
}