svn commit: r360301 - in stable: 10/contrib/bsnmp/lib 11/contrib/bsnmp/lib 12/contrib/bsnmp/lib
Dimitry Andric
dim at FreeBSD.org
Sat Apr 25 12:57:21 UTC 2020
Author: dim
Date: Sat Apr 25 12:57:20 2020
New Revision: 360301
URL: https://svnweb.freebsd.org/changeset/base/360301
Log:
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
Modified:
stable/10/contrib/bsnmp/lib/snmpclient.c
Directory Properties:
stable/10/ (props changed)
Changes in other areas also in this revision:
Modified:
stable/11/contrib/bsnmp/lib/snmpclient.c
stable/12/contrib/bsnmp/lib/snmpclient.c
Directory Properties:
stable/11/ (props changed)
stable/12/ (props changed)
Modified: stable/10/contrib/bsnmp/lib/snmpclient.c
==============================================================================
--- stable/10/contrib/bsnmp/lib/snmpclient.c Sat Apr 25 12:50:21 2020 (r360300)
+++ stable/10/contrib/bsnmp/lib/snmpclient.c Sat Apr 25 12:57:20 2020 (r360301)
@@ -474,7 +474,7 @@ table_check_response(struct tabwork *work, const struc
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 */
More information about the svn-src-stable
mailing list