Date: Sat, 25 Apr 2020 12:57:21 +0000 (UTC) From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r360301 - in stable: 10/contrib/bsnmp/lib 11/contrib/bsnmp/lib 12/contrib/bsnmp/lib Message-ID: <202004251257.03PCvLNF069433@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202004251257.03PCvLNF069433>