From b6bb903ff2b2451b81a72f03374ee5f97b2201ed Mon Sep 17 00:00:00 2001 From: gdt Date: Sat, 21 Jul 2012 14:52:40 +0000 Subject: [PATCH] Add comments describing parameter handling for ip6_insertfraghdr. Depending on compiler options, this code can be involved in an (apparently) spurious compiler warning. However, it was not immediately obvious the the compiler was wrong. --- sys/netinet6/ip6_output.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c index c840151cbbb2..cf6ed2af9ab3 100644 --- a/sys/netinet6/ip6_output.c +++ b/sys/netinet6/ip6_output.c @@ -1,4 +1,4 @@ -/* $NetBSD: ip6_output.c,v 1.149 2012/06/25 15:28:40 christos Exp $ */ +/* $NetBSD: ip6_output.c,v 1.150 2012/07/21 14:52:40 gdt Exp $ */ /* $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $ */ /* @@ -62,7 +62,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip6_output.c,v 1.149 2012/06/25 15:28:40 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip6_output.c,v 1.150 2012/07/21 14:52:40 gdt Exp $"); #include "opt_inet.h" #include "opt_inet6.h" @@ -1147,6 +1147,10 @@ ip6_insert_jumboopt(struct ip6_exthdrs *exthdrs, u_int32_t plen) /* * Insert fragment header and copy unfragmentable header portions. + * + * *frghdrp will not be read, and it is guaranteed that either an + * error is returned or that *frghdrp will point to space allocated + * for the fragment header. */ static int ip6_insertfraghdr(struct mbuf *m0, struct mbuf *m, int hlen,