Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net MINDEX() macro has 'return 0; ' statement. It doesn't...
details: https://anonhg.NetBSD.org/src/rev/d154cb1f1784
branches: trunk
changeset: 781034:d154cb1f1784
user: alnsn <alnsn%NetBSD.org@localhost>
date: Wed Aug 15 21:31:39 2012 +0000
description:
MINDEX() macro has 'return 0;' statement. It doesn't set *err to
1 before return when invoked from m_xword() and m_xhalf() functions.
The caller doesn't set it to 1 either. So, set *err to 1 before
invoking MINDEX().
diffstat:
sys/net/bpf_filter.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (34 lines):
diff -r 3fbe04e53546 -r d154cb1f1784 sys/net/bpf_filter.c
--- a/sys/net/bpf_filter.c Wed Aug 15 21:03:09 2012 +0000
+++ b/sys/net/bpf_filter.c Wed Aug 15 21:31:39 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bpf_filter.c,v 1.52 2012/08/02 20:13:24 rmind Exp $ */
+/* $NetBSD: bpf_filter.c,v 1.53 2012/08/15 21:31:39 alnsn 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.52 2012/08/02 20:13:24 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bpf_filter.c,v 1.53 2012/08/15 21:31:39 alnsn Exp $");
#if 0
#if !(defined(lint) || defined(KERNEL))
@@ -78,6 +78,7 @@
u_char *cp, *np;
struct mbuf *m0;
+ *err = 1;
MINDEX(len, m, k);
cp = mtod(m, u_char *) + k;
if (len >= k + 4) {
@@ -109,6 +110,7 @@
u_char *cp;
struct mbuf *m0;
+ *err = 1;
MINDEX(len, m, k);
cp = mtod(m, u_char *) + k;
if (len >= k + 2) {
Home |
Main Index |
Thread Index |
Old Index