Fix memset usage.
This commit is contained in:
parent
30dc9201bb
commit
017dd250ef
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: fdfs.c,v 1.7 2009/08/06 00:51:55 pooka Exp $ */
|
||||
/* $NetBSD: fdfs.c,v 1.8 2011/07/01 02:48:48 joerg Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2005 The NetBSD Foundation, Inc.
|
||||
|
@ -143,7 +143,7 @@ fd_reclaim(struct uvnode *vp)
|
|||
free(fs->fd_bufp[i].buf);
|
||||
free(fs->fd_bufp);
|
||||
free(fs);
|
||||
memset(vp, 0, sizeof(vp));
|
||||
memset(vp, 0, sizeof(*vp));
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pppoectl.c,v 1.21 2006/03/17 15:53:46 rumble Exp $ */
|
||||
/* $NetBSD: pppoectl.c,v 1.22 2011/07/01 02:51:52 joerg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 Joerg Wunsch
|
||||
|
@ -31,7 +31,7 @@
|
|||
#include <sys/cdefs.h>
|
||||
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: pppoectl.c,v 1.21 2006/03/17 15:53:46 rumble Exp $");
|
||||
__RCSID("$NetBSD: pppoectl.c,v 1.22 2011/07/01 02:51:52 joerg Exp $");
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -237,7 +237,7 @@ main(int argc, char **argv)
|
|||
strncpy(status.ifname, ifname, sizeof status.ifname);
|
||||
memset(&timeout, 0, sizeof timeout);
|
||||
strncpy(timeout.ifname, ifname, sizeof timeout.ifname);
|
||||
memset(&authfailstats, 0, sizeof &authfailstats);
|
||||
memset(&authfailstats, 0, sizeof authfailstats);
|
||||
strncpy(authfailstats.ifname, ifname, sizeof authfailstats.ifname);
|
||||
memset(&authfailset, 0, sizeof authfailset);
|
||||
strncpy(authfailset.ifname, ifname, sizeof authfailset.ifname);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: route.c,v 1.130 2011/06/22 04:57:28 kefren Exp $ */
|
||||
/* $NetBSD: route.c,v 1.131 2011/07/01 02:54:51 joerg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1989, 1991, 1993
|
||||
|
@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1989, 1991, 1993\
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)route.c 8.6 (Berkeley) 4/28/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: route.c,v 1.130 2011/06/22 04:57:28 kefren Exp $");
|
||||
__RCSID("$NetBSD: route.c,v 1.131 2011/07/01 02:54:51 joerg Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -1464,7 +1464,7 @@ prefixlen(const char *s, struct sou *soup)
|
|||
r = len & 7;
|
||||
switch (af) {
|
||||
case AF_INET:
|
||||
memset(soup->so_mask, 0, sizeof(soup->so_mask));
|
||||
memset(soup->so_mask, 0, sizeof(*soup->so_mask));
|
||||
soup->so_mask->sin.sin_family = AF_INET;
|
||||
soup->so_mask->sin.sin_len = sizeof(struct sockaddr_in);
|
||||
soup->so_mask->sin.sin_addr.s_addr = (len == 0 ? 0
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ieee8023ad_lacp.c,v 1.9 2009/05/29 04:57:05 darran Exp $ */
|
||||
/* $NetBSD: ieee8023ad_lacp.c,v 1.10 2011/07/01 02:46:24 joerg Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c)2005 YAMAMOTO Takashi,
|
||||
|
@ -27,7 +27,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp.c,v 1.9 2009/05/29 04:57:05 darran Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp.c,v 1.10 2011/07/01 02:46:24 joerg Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/callout.h>
|
||||
|
@ -447,7 +447,7 @@ ieee8023ad_portinit(struct agr_port *port)
|
|||
{
|
||||
struct ieee8023ad_port *iport = IEEE8023AD_PORT(port);
|
||||
|
||||
memset(iport, 0, sizeof(iport));
|
||||
memset(iport, 0, sizeof(*iport));
|
||||
|
||||
lacp_portinit(port);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue