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
This commit is contained in:
Justin Hibbits 2019-11-18 23:23:38 +00:00
parent 506f364029
commit 38effe887e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=354834

View File

@ -480,7 +480,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 */