diff options
author | bz <bz@FreeBSD.org> | 2008-01-20 10:08:15 +0000 |
---|---|---|
committer | bz <bz@FreeBSD.org> | 2008-01-20 10:08:15 +0000 |
commit | 866f4830835afacd31604f0a9acb0f2cb9f8a14b (patch) | |
tree | 22df5c51a59c1803729c8da64acea0e9b7cfd94b | |
parent | 3646748d3a5e87a887add01aa8e8876397b298c1 (diff) | |
download | FreeBSD-src-866f4830835afacd31604f0a9acb0f2cb9f8a14b.zip FreeBSD-src-866f4830835afacd31604f0a9acb0f2cb9f8a14b.tar.gz |
Correct the commented out debugging printf()s in REPLACE and NEXT macros.
ip6_sprintf() needs a buffer as first argument these days.
MFC after: 2 weeks
-rw-r--r-- | sys/netinet6/in6_src.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/netinet6/in6_src.c b/sys/netinet6/in6_src.c index 3093f6f..0508db2 100644 --- a/sys/netinet6/in6_src.c +++ b/sys/netinet6/in6_src.c @@ -141,14 +141,20 @@ static struct in6_addrpolicy *match_addrsel_policy(struct sockaddr_in6 *); if ((r) < sizeof(ip6stat.ip6s_sources_rule) / \ sizeof(ip6stat.ip6s_sources_rule[0])) /* check for safety */ \ ip6stat.ip6s_sources_rule[(r)]++; \ - /* printf("in6_selectsrc: replace %s with %s by %d\n", ia_best ? ip6_sprintf(&ia_best->ia_addr.sin6_addr) : "none", ip6_sprintf(&ia->ia_addr.sin6_addr), (r)); */ \ + /* { \ + char ip6buf[INET6_ADDRSTRLEN], ip6b[INET6_ADDRSTRLEN]; \ + printf("in6_selectsrc: replace %s with %s by %d\n", ia_best ? ip6_sprintf(ip6buf, &ia_best->ia_addr.sin6_addr) : "none", ip6_sprintf(ip6b, &ia->ia_addr.sin6_addr), (r)); \ + } */ \ goto replace; \ } while(0) #define NEXT(r) do {\ if ((r) < sizeof(ip6stat.ip6s_sources_rule) / \ sizeof(ip6stat.ip6s_sources_rule[0])) /* check for safety */ \ ip6stat.ip6s_sources_rule[(r)]++; \ - /* printf("in6_selectsrc: keep %s against %s by %d\n", ia_best ? ip6_sprintf(&ia_best->ia_addr.sin6_addr) : "none", ip6_sprintf(&ia->ia_addr.sin6_addr), (r)); */ \ + /* { \ + char ip6buf[INET6_ADDRSTRLEN], ip6b[INET6_ADDRSTRLEN]; \ + printf("in6_selectsrc: keep %s against %s by %d\n", ia_best ? ip6_sprintf(ip6buf, &ia_best->ia_addr.sin6_addr) : "none", ip6_sprintf(ip6b, &ia->ia_addr.sin6_addr), (r)); \ + } */ \ goto next; /* XXX: we can't use 'continue' here */ \ } while(0) #define BREAK(r) do { \ |