Module Name: src
Committed By: tsutsui
Date: Tue Sep 22 13:13:46 UTC 2009
Modified Files:
src/sys/dev/sbus: be.c qe.c
Log Message:
Remove some more unnecessary casts.
To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 src/sys/dev/sbus/be.c
cvs rdiff -u -r1.55 -r1.56 src/sys/dev/sbus/qe.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/sbus/be.c
diff -u src/sys/dev/sbus/be.c:1.74 src/sys/dev/sbus/be.c:1.75
--- src/sys/dev/sbus/be.c:1.74 Fri Sep 18 14:40:49 2009
+++ src/sys/dev/sbus/be.c Tue Sep 22 13:13:46 2009
@@ -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;
Index: src/sys/dev/sbus/qe.c
diff -u src/sys/dev/sbus/qe.c:1.55 src/sys/dev/sbus/qe.c:1.56
--- src/sys/dev/sbus/qe.c:1.55 Sat Sep 19 11:53:42 2009
+++ src/sys/dev/sbus/qe.c Tue Sep 22 13:13:46 2009
@@ -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);