aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2020-06-17 17:11:53 +0200
committerFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2020-06-17 17:12:20 +0200
commit01afa17bf96ff719931c4f7dc644381132e72456 (patch)
treede8b6d9bbee4220d9222339759e582a2537047e1
parent39c7f8dd3acf3deb721ebf212c89738942eb8da2 (diff)
DAG: Fix a condition
Found with cppcheck. The warning was: pcap-dag.c:1117:6: style: Suspicious condition (assignment + comparison); Clarify expression with parentheses. [clarifyCondition] if ((dag_error = dag_config_get_uint32_attribute_ex(pd->dag_ref, pd->drop_attr, &stream_drop) == kDagErrNone)) { ^
-rw-r--r--pcap-dag.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pcap-dag.c b/pcap-dag.c
index 928088fe..62f6e649 100644
--- a/pcap-dag.c
+++ b/pcap-dag.c
@@ -1114,7 +1114,7 @@ dag_stats(pcap_t *p, struct pcap_stat *ps) {
/* Note this counter is cleared at start of capture and will wrap at UINT_MAX.
* The application is responsible for polling ps_drop frequently enough
* to detect each wrap and integrate total drop with a wider counter */
- if ((dag_error = dag_config_get_uint32_attribute_ex(pd->dag_ref, pd->drop_attr, &stream_drop) == kDagErrNone)) {
+ if ((dag_error = dag_config_get_uint32_attribute_ex(pd->dag_ref, pd->drop_attr, &stream_drop)) == kDagErrNone) {
pd->stat.ps_drop = stream_drop;
} else {
snprintf(p->errbuf, PCAP_ERRBUF_SIZE, "reading stream drop attribute: %s",