Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/shmif_dumpbus quasi-cosmetic nit to previous: limit ...
details: https://anonhg.NetBSD.org/src/rev/f51cb8bfa16e
branches: trunk
changeset: 331670:f51cb8bfa16e
user: pooka <pooka%NetBSD.org@localhost>
date: Mon Aug 18 14:35:29 2014 +0000
description:
quasi-cosmetic nit to previous: limit variable scope
diffstat:
usr.bin/shmif_dumpbus/shmif_dumpbus.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (44 lines):
diff -r 39f9c3c9d131 -r f51cb8bfa16e usr.bin/shmif_dumpbus/shmif_dumpbus.c
--- a/usr.bin/shmif_dumpbus/shmif_dumpbus.c Mon Aug 18 14:33:23 2014 +0000
+++ b/usr.bin/shmif_dumpbus/shmif_dumpbus.c Mon Aug 18 14:35:29 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: shmif_dumpbus.c,v 1.15 2014/08/18 14:33:23 pooka Exp $ */
+/* $NetBSD: shmif_dumpbus.c,v 1.16 2014/08/18 14:35:29 pooka Exp $ */
/*-
* Copyright (c) 2010 Antti Kantee. All Rights Reserved.
@@ -33,7 +33,7 @@
#include <rump/rumpuser_port.h>
#ifndef lint
-__RCSID("$NetBSD: shmif_dumpbus.c,v 1.15 2014/08/18 14:33:23 pooka Exp $");
+__RCSID("$NetBSD: shmif_dumpbus.c,v 1.16 2014/08/18 14:35:29 pooka Exp $");
#endif /* !lint */
#include <sys/types.h>
@@ -217,8 +217,6 @@
while (curbus <= buslast || bonus) {
struct pcap_pkthdr packhdr;
- struct shmif_pkthdr sp;
- struct shmif_pkthdr2 sp2;
uint32_t oldoff;
uint32_t curlen;
uint32_t sp_sec, sp_usec, sp_len;
@@ -230,12 +228,16 @@
oldoff = curbus;
if (useversion == 3) {
+ struct shmif_pkthdr sp;
+
curbus = shmif_busread(bmem,
&sp, oldoff, sizeof(sp), &wrap);
sp_len = sp.sp_len;
sp_sec = sp.sp_sec;
sp_usec = sp.sp_usec;
} else {
+ struct shmif_pkthdr2 sp2;
+
curbus = shmif_busread(bmem,
&sp2, oldoff, sizeof(sp2), &wrap);
sp_len = sp2.sp_len;
Home |
Main Index |
Thread Index |
Old Index