--------------------- PatchSet 11527 Date: 2007/07/15 09:51:18 Author: hno Branch: SQUID_2_6 Tag: (none) Log: MFC: Bug #2010: snmp_core.cc:828: warning: array subscript is above array bounds silly harmless logic error triggering correct compiler warnings.. Merged changes: 2007/07/06 18:51:23 hno +2 -2 Bug #2010: snmp_core.cc:828: warning: array subscript is above array bounds Members: src/snmp_core.c:1.63->1.63.2.1 Index: squid/src/snmp_core.c =================================================================== RCS file: /cvsroot/squid/squid/src/snmp_core.c,v retrieving revision 1.63 retrieving revision 1.63.2.1 diff -u -r1.63 -r1.63.2.1 --- squid/src/snmp_core.c 28 Nov 2006 23:16:48 -0000 1.63 +++ squid/src/snmp_core.c 15 Jul 2007 09:51:18 -0000 1.63.2.1 @@ -1,6 +1,6 @@ /* - * $Id: snmp_core.c,v 1.63 2006/11/28 23:16:48 hno Exp $ + * $Id: snmp_core.c,v 1.63.2.1 2007/07/15 09:51:18 hno Exp $ * * DEBUG: section 49 SNMP support * AUTHOR: Glenn Chisholm @@ -792,7 +792,7 @@ *len += 1; } else { identifier = name[*len - 1]; - while ((identifier != index[loop]) && (loop < TIME_INDEX_LEN)) + while ((loop < TIME_INDEX_LEN) && (identifier != index[loop])) loop++; if (loop < TIME_INDEX_LEN - 1) { instance = xmalloc(sizeof(name) * (*len));