On Tue, 17 Oct 2006 09:48:27 +0100 Dave wrote:
DS> Index: agent/snmp_agent.c
DS> +int
DS> +netsnmp_request_set_error_idx(netsnmp_request_info *request,
DS> + int error_value, int idx)
DS> +{
...
DS> + /*
DS> + * Skip to the indicated varbind
DS> + */
DS> + for ( i=2; i<idx; i++) {
DS> + req = req->next;
DS> + if (!req)
DS> + return SNMPERR_NO_VARS;
DS> + }
Why is i initialized to 2? I could see 1 (0/1 based conversion), but 2?
Whatever the reason, I think it's an odd enough case to warrant explanation in
a comment for this code...
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders