Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/rump/net/lib/libshmif reset pktsize each loop
details: https://anonhg.NetBSD.org/src/rev/49817a6db67c
branches: trunk
changeset: 757131:49817a6db67c
user: pooka <pooka%NetBSD.org@localhost>
date: Sun Aug 15 21:57:58 2010 +0000
description:
reset pktsize each loop
diffstat:
sys/rump/net/lib/libshmif/if_shmem.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (35 lines):
diff -r edfa3be0b374 -r 49817a6db67c sys/rump/net/lib/libshmif/if_shmem.c
--- a/sys/rump/net/lib/libshmif/if_shmem.c Sun Aug 15 21:52:30 2010 +0000
+++ b/sys/rump/net/lib/libshmif/if_shmem.c Sun Aug 15 21:57:58 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_shmem.c,v 1.24 2010/08/15 21:41:39 pooka Exp $ */
+/* $NetBSD: if_shmem.c,v 1.25 2010/08/15 21:57:58 pooka Exp $ */
/*
* Copyright (c) 2009 Antti Kantee. All Rights Reserved.
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_shmem.c,v 1.24 2010/08/15 21:41:39 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_shmem.c,v 1.25 2010/08/15 21:57:58 pooka Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -225,7 +225,7 @@
struct shmif_sc *sc = ifp->if_softc;
struct mbuf *m, *m0;
uint32_t lastoff, dataoff, npktlenoff;
- uint32_t pktsize = 0;
+ uint32_t pktsize;
bool wrote = false;
bool wrap;
int error;
@@ -239,6 +239,7 @@
break;
}
+ pktsize = 0;
for (m = m0; m != NULL; m = m->m_next) {
pktsize += m->m_len;
}
Home |
Main Index |
Thread Index |
Old Index