On 20/10/06, Robert Story <[EMAIL PROTECTED]> wrote:
> DS> + /*
> DS> + * Skip to the indicated varbind
> DS> + */
> DS> + for ( i=2; i<idx; i++) {
> DS> + req = req->next;
> Why is i initialized to 2?
Because 'req' starts by pointing to the first varbind (index 1).
So if 'idx' is 1, then we're already at the right place.
This code needs to skip the (n-1) varbinds preceding the requested (n'th) one.
> Whatever the reason, I think it's an odd enough case to warrant explanation in
> a comment for this code...
Fair enough.
Dave
-------------------------------------------------------------------------
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