Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Fix memset usage.
details: https://anonhg.NetBSD.org/src/rev/95a503650ea9
branches: trunk
changeset: 766738:95a503650ea9
user: joerg <joerg%NetBSD.org@localhost>
date: Fri Jul 01 02:46:24 2011 +0000
description:
Fix memset usage.
diffstat:
libexec/lfs_cleanerd/fdfs.c | 4 ++--
sbin/pppoectl/pppoectl.c | 6 +++---
sbin/route/route.c | 6 +++---
sys/net/agr/ieee8023ad_lacp.c | 6 +++---
4 files changed, 11 insertions(+), 11 deletions(-)
diffs (99 lines):
diff -r 5e46e604ed1e -r 95a503650ea9 libexec/lfs_cleanerd/fdfs.c
--- a/libexec/lfs_cleanerd/fdfs.c Fri Jul 01 02:46:15 2011 +0000
+++ b/libexec/lfs_cleanerd/fdfs.c Fri Jul 01 02:46:24 2011 +0000
@@ -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 @@
free(fs->fd_bufp[i].buf);
free(fs->fd_bufp);
free(fs);
- memset(vp, 0, sizeof(vp));
+ memset(vp, 0, sizeof(*vp));
}
/*
diff -r 5e46e604ed1e -r 95a503650ea9 sbin/pppoectl/pppoectl.c
--- a/sbin/pppoectl/pppoectl.c Fri Jul 01 02:46:15 2011 +0000
+++ b/sbin/pppoectl/pppoectl.c Fri Jul 01 02:46:24 2011 +0000
@@ -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 @@
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);
diff -r 5e46e604ed1e -r 95a503650ea9 sbin/route/route.c
--- a/sbin/route/route.c Fri Jul 01 02:46:15 2011 +0000
+++ b/sbin/route/route.c Fri Jul 01 02:46:24 2011 +0000
@@ -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 @@
#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 @@
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
diff -r 5e46e604ed1e -r 95a503650ea9 sys/net/agr/ieee8023ad_lacp.c
--- a/sys/net/agr/ieee8023ad_lacp.c Fri Jul 01 02:46:15 2011 +0000
+++ b/sys/net/agr/ieee8023ad_lacp.c Fri Jul 01 02:46:24 2011 +0000
@@ -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 @@
{
struct ieee8023ad_port *iport = IEEE8023AD_PORT(port);
- memset(iport, 0, sizeof(iport));
+ memset(iport, 0, sizeof(*iport));
lacp_portinit(port);
}
Home |
Main Index |
Thread Index |
Old Index