nd6.c (101240) | nd6.c (109623) |
---|---|
1/* $FreeBSD: head/sys/netinet6/nd6.c 101240 2002-08-02 20:49:14Z rwatson $ */ | 1/* $FreeBSD: head/sys/netinet6/nd6.c 109623 2003-01-21 08:56:16Z alfred $ */ |
2/* $KAME: nd6.c,v 1.144 2001/05/24 07:44:00 itojun Exp $ */ 3 4/* 5 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions --- 149 unchanged lines hidden (view full) --- 159 size_t n; 160 caddr_t q; 161 162 while (if_index >= nd_ifinfo_indexlim) 163 nd_ifinfo_indexlim <<= 1; 164 165 /* grow nd_ifinfo */ 166 n = nd_ifinfo_indexlim * sizeof(struct nd_ifinfo); | 2/* $KAME: nd6.c,v 1.144 2001/05/24 07:44:00 itojun Exp $ */ 3 4/* 5 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions --- 149 unchanged lines hidden (view full) --- 159 size_t n; 160 caddr_t q; 161 162 while (if_index >= nd_ifinfo_indexlim) 163 nd_ifinfo_indexlim <<= 1; 164 165 /* grow nd_ifinfo */ 166 n = nd_ifinfo_indexlim * sizeof(struct nd_ifinfo); |
167 q = (caddr_t)malloc(n, M_IP6NDP, M_WAITOK); | 167 q = (caddr_t)malloc(n, M_IP6NDP, 0); |
168 bzero(q, n); 169 if (nd_ifinfo) { 170 bcopy((caddr_t)nd_ifinfo, q, n/2); 171 free((caddr_t)nd_ifinfo, M_IP6NDP); 172 } 173 nd_ifinfo = (struct nd_ifinfo *)q; 174 } 175 --- 2077 unchanged lines hidden --- | 168 bzero(q, n); 169 if (nd_ifinfo) { 170 bcopy((caddr_t)nd_ifinfo, q, n/2); 171 free((caddr_t)nd_ifinfo, M_IP6NDP); 172 } 173 nd_ifinfo = (struct nd_ifinfo *)q; 174 } 175 --- 2077 unchanged lines hidden --- |