Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net bpf_filter: remove unnecessary memset(), add a comment.
details: https://anonhg.NetBSD.org/src/rev/9be311816b02
branches: trunk
changeset: 780666:9be311816b02
user: rmind <rmind%NetBSD.org@localhost>
date: Thu Aug 02 20:13:24 2012 +0000
description:
bpf_filter: remove unnecessary memset(), add a comment.
diffstat:
sys/net/bpf_filter.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (30 lines):
diff -r 1b5dc8311aa2 -r 9be311816b02 sys/net/bpf_filter.c
--- a/sys/net/bpf_filter.c Thu Aug 02 16:06:58 2012 +0000
+++ b/sys/net/bpf_filter.c Thu Aug 02 20:13:24 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bpf_filter.c,v 1.51 2012/08/01 23:24:29 rmind Exp $ */
+/* $NetBSD: bpf_filter.c,v 1.52 2012/08/02 20:13:24 rmind Exp $ */
/*-
* Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bpf_filter.c,v 1.51 2012/08/01 23:24:29 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bpf_filter.c,v 1.52 2012/08/02 20:13:24 rmind Exp $");
#if 0
#if !(defined(lint) || defined(KERNEL))
@@ -149,7 +149,10 @@
return (u_int)-1;
}
- memset(mem, 0, sizeof(mem));
+ /*
+ * Note: safe to leave memwords uninitialised, as the validation
+ * step ensures that it will not be read, if it was not written.
+ */
A = 0;
X = 0;
--pc;
Home |
Main Index |
Thread Index |
Old Index