Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/sbus Remove some more unnecessary casts.
details: https://anonhg.NetBSD.org/src/rev/7519e60a7049
branches: trunk
changeset: 747584:7519e60a7049
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Tue Sep 22 13:13:46 2009 +0000
description:
Remove some more unnecessary casts.
diffstat:
sys/dev/sbus/be.c | 12 ++++++------
sys/dev/sbus/qe.c | 12 ++++++------
2 files changed, 12 insertions(+), 12 deletions(-)
diffs (108 lines):
diff -r 054234435935 -r 7519e60a7049 sys/dev/sbus/be.c
--- a/sys/dev/sbus/be.c Tue Sep 22 12:56:06 2009 +0000
+++ b/sys/dev/sbus/be.c Tue Sep 22 13:13:46 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: be.c,v 1.74 2009/09/18 14:40:49 tsutsui Exp $ */
+/* $NetBSD: be.c,v 1.75 2009/09/22 13:13:46 tsutsui Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: be.c,v 1.74 2009/09/18 14:40:49 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: be.c,v 1.75 2009/09/22 13:13:46 tsutsui Exp $");
#include "opt_ddb.h"
#include "opt_inet.h"
@@ -473,7 +473,7 @@
{
struct mbuf *n;
int len, tlen = 0, boff = 0;
- void *bp;
+ uint8_t *bp;
bp = sc->sc_rb.rb_txbuf + (idx % sc->sc_rb.rb_ntbuf) * BE_PKT_BUF_SZ;
@@ -483,7 +483,7 @@
MFREE(m, n);
continue;
}
- memcpy((char *)bp + boff, mtod(m, void *), len);
+ memcpy(bp + boff, mtod(m, void *), len);
boff += len;
tlen += len;
MFREE(m, n);
@@ -504,7 +504,7 @@
struct mbuf *m;
struct mbuf *top, **mp;
int len, pad, boff = 0;
- void *bp;
+ uint8_t *bp;
bp = sc->sc_rb.rb_rxbuf + (idx % sc->sc_rb.rb_nrbuf) * BE_PKT_BUF_SZ;
@@ -535,7 +535,7 @@
len = MCLBYTES;
}
m->m_len = len = min(totlen, len);
- memcpy(mtod(m, void *), (char *)bp + boff, len);
+ memcpy(mtod(m, void *), bp + boff, len);
boff += len;
totlen -= len;
*mp = m;
diff -r 054234435935 -r 7519e60a7049 sys/dev/sbus/qe.c
--- a/sys/dev/sbus/qe.c Tue Sep 22 12:56:06 2009 +0000
+++ b/sys/dev/sbus/qe.c Tue Sep 22 13:13:46 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: qe.c,v 1.55 2009/09/19 11:53:42 tsutsui Exp $ */
+/* $NetBSD: qe.c,v 1.56 2009/09/22 13:13:46 tsutsui Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: qe.c,v 1.55 2009/09/19 11:53:42 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: qe.c,v 1.56 2009/09/22 13:13:46 tsutsui Exp $");
#define QEDEBUG
@@ -332,7 +332,7 @@
struct mbuf *m;
struct mbuf *top, **mp;
int len, pad, boff = 0;
- void *bp;
+ uint8_t *bp;
bp = sc->sc_rb.rb_rxbuf + (idx % sc->sc_rb.rb_nrbuf) * QE_PKT_BUF_SZ;
@@ -362,7 +362,7 @@
len = MCLBYTES;
}
m->m_len = len = min(totlen, len);
- memcpy(mtod(m, void *), (char *)bp + boff, len);
+ memcpy(mtod(m, void *), bp + boff, len);
boff += len;
totlen -= len;
*mp = m;
@@ -381,7 +381,7 @@
{
struct mbuf *n;
int len, tlen = 0, boff = 0;
- void *bp;
+ uint8_t *bp;
bp = sc->sc_rb.rb_txbuf + (idx % sc->sc_rb.rb_ntbuf) * QE_PKT_BUF_SZ;
@@ -391,7 +391,7 @@
MFREE(m, n);
continue;
}
- memcpy((char *)bp + boff, mtod(m, void *), len);
+ memcpy(bp + boff, mtod(m, void *), len);
boff += len;
tlen += len;
MFREE(m, n);
Home |
Main Index |
Thread Index |
Old Index