aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2020-04-25 12:57:20 +0000
committerDimitry Andric <dim@FreeBSD.org>2020-04-25 12:57:20 +0000
commit33d365389d71ddf14d052ce67e90b003611cd8cd (patch)
tree2a9b0c68d59a4aeb683452860a5f7220d1a2b8f8
parent5fd12231117b35b09a0205c49c521964fdff3f55 (diff)
downloadsrc-33d365389d71ddf14d052ce67e90b003611cd8cd.tar.gz
src-33d365389d71ddf14d052ce67e90b003611cd8cd.zip
MFC r354834 (by jhibbits):
bsnmp: Fix operator precedence in error check in table_check_response Summary: The ?: operator has a lower precedence than == and &&, so the result will always be recorded as true. Found by gcc8. Reviewed by: ngie, ae Differential Revision: https://reviews.freebsd.org/D22427
Notes
Notes: svn path=/stable/10/; revision=360301
-rw-r--r--contrib/bsnmp/lib/snmpclient.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/bsnmp/lib/snmpclient.c b/contrib/bsnmp/lib/snmpclient.c
index 91778063305e..4f15c74352d3 100644
--- a/contrib/bsnmp/lib/snmpclient.c
+++ b/contrib/bsnmp/lib/snmpclient.c
@@ -474,7 +474,7 @@ table_check_response(struct tabwork *work, const struct snmp_pdu *resp)
if (snmp_client.version == SNMP_V1 &&
resp->error_status == SNMP_ERR_NOSUCHNAME &&
resp->error_index ==
- (work->descr->last_change.len == 0) ? 1 : 2)
+ ((work->descr->last_change.len == 0) ? 1 : 2))
/* EOT */
return (0);
/* Error */