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 */ _______________________________________________ svn-src-stable-10@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10 To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"