--------------------- PatchSet 6157 Date: 2007/11/20 19:31:23 Author: rmartinez Branch: squid3-ipv6 Tag: (none) Log: Cleaner and less redundant code Members: src/snmp_core.cc:1.10.8.25->1.10.8.26 Index: squid3/src/snmp_core.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/snmp_core.cc,v retrieving revision 1.10.8.25 retrieving revision 1.10.8.26 diff -u -r1.10.8.25 -r1.10.8.26 --- squid3/src/snmp_core.cc 20 Nov 2007 12:14:22 -0000 1.10.8.25 +++ squid3/src/snmp_core.cc 20 Nov 2007 19:31:23 -0000 1.10.8.26 @@ -1,6 +1,6 @@ /* - * $Id: snmp_core.cc,v 1.10.8.25 2007/11/20 12:14:22 rmartinez Exp $ + * $Id: snmp_core.cc,v 1.10.8.26 2007/11/20 19:31:23 rmartinez Exp $ * * DEBUG: section 49 SNMP support * AUTHOR: Glenn Chisholm @@ -1179,30 +1179,14 @@ oid2addr(oid * id, IPAddress &addr) { u_int code; - u_int size; - struct in_addr iaddr; code = id[0]; - u_int i; - u_char *cp; #if USE_IPV6 - struct in6_addr i6addr; - size = (code == INETADDRESSTYPE_IPV4) ? sizeof(struct in_addr):sizeof(struct in6_addr); - cp = ( code == INETADDRESSTYPE_IPV4 ) ? (u_char *) &(iaddr.s_addr) : (u_char *) &(i6addr) ; -#else - size = sizeof(struct in_addr) ; - cp = (u_char *) &(iaddr.s_addr); -#endif /* USE_IPV6 */ - for(i=0 ; i