Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Remove bogus (void *) casts.

These are the cases where the function's prototype declares the
argument as void *.
  • Loading branch information...
commit 4e1af74f7f376ab663c660ad01dafb572ab8df66 1 parent 9625009
Sascha Wildner authored
Showing with 93 additions and 109 deletions.
  1. +2 −3 lib/libc/citrus/citrus_ctype_fallback.c
  2. +1 −2  lib/libc/rpc/key_call.c
  3. +1 −1  lib/libstand/nfs.c
  4. +2 −2 lib/libstand/printf.c
  5. +1 −1  lib/libtcplay/hdr.c
  6. +2 −4 lib/libtelnet/sra.c
  7. +1 −2  libexec/mknetid/hash.c
  8. +1 −2  libexec/revnetgroup/hash.c
  9. +10 −12 sbin/ffsinfo/ffsinfo.c
  10. +23 −24 sbin/growfs/growfs.c
  11. +1 −2  sys/boot/efi/libefi/bootinfo.c
  12. +1 −2  sys/boot/pc32/libi386/bootinfo32.c
  13. +1 −2  sys/boot/pc32/libi386/bootinfo64.c
  14. +1 −1  sys/dev/drm/drm_irq.c
  15. +3 −3 sys/dev/misc/kbd/kbd.c
  16. +8 −10 sys/dev/netif/axe/if_axe.c
  17. +6 −6 sys/dev/netif/tl/if_tl.c
  18. +1 −1  sys/dev/raid/mfi/mfi_tbolt.c
  19. +1 −1  sys/dev/raid/mly/mly.c
  20. +6 −6 sys/dev/raid/tws/tws_cam.c
  21. +1 −1  sys/dev/raid/tws/tws_user.c
  22. +1 −1  sys/dev/sound/pci/hda/hdac.c
  23. +1 −1  sys/dev/usbmisc/ukbd/ukbd.c
  24. +1 −1  sys/dev/usbmisc/umass/umass.c
  25. +1 −2  sys/kern/kern_sysctl.c
  26. +2 −2 sys/kern/subr_prf.c
  27. +2 −2 sys/netinet/sctp_output.c
  28. +4 −4 usr.bin/lex/initscan.c
  29. +3 −4 usr.bin/truss/syscalls.c
  30. +3 −3 usr.sbin/mlxcontrol/interface.c
  31. +1 −1  usr.sbin/rtadvd/rtadvd.c
View
5 lib/libc/citrus/citrus_ctype_fallback.c
@@ -1,5 +1,4 @@
/* $NetBSD: src/lib/libc/citrus/citrus_ctype_fallback.c,v 1.2 2003/06/27 14:52:25 yamt Exp $ */
-/* $DragonFly: src/lib/libc/citrus/citrus_ctype_fallback.c,v 1.2 2008/04/10 10:21:01 hasso Exp $ */
/*-
* Copyright (c)2003 Citrus Project,
@@ -65,7 +64,7 @@ _citrus_ctype_btowc_fallback(_citrus_ctype_rec_t * __restrict cc,
memset(&pspriv, 0, sizeof(pspriv));
mb = (char)(unsigned)c;
- err = _citrus_ctype_mbrtowc(cc, &wc, &mb, 1, (void *)&pspriv, &nr);
+ err = _citrus_ctype_mbrtowc(cc, &wc, &mb, 1, &pspriv, &nr);
if (!err && (nr == 0 || nr == 1))
*wcresult = wc;
else
@@ -94,7 +93,7 @@ _citrus_ctype_wctob_fallback(_citrus_ctype_rec_t * __restrict cc,
return 0;
}
memset(&pspriv, 0, sizeof(pspriv));
- err = _citrus_ctype_wcrtomb(cc, buf, (wchar_t)wc, (void *)&pspriv, &nr);
+ err = _citrus_ctype_wcrtomb(cc, buf, (wchar_t)wc, &pspriv, &nr);
if (!err && nr == 1)
*cresult = buf[0];
else
View
3  lib/libc/rpc/key_call.c
@@ -91,8 +91,7 @@ key_setsecret(const char *secretkey)
{
keystatus status;
- if (!key_call((u_long) KEY_SET, (xdrproc_t)xdr_keybuf,
- (void *)secretkey,
+ if (!key_call((u_long) KEY_SET, (xdrproc_t)xdr_keybuf, secretkey,
(xdrproc_t)xdr_keystatus, &status)) {
return (-1);
}
View
2  lib/libstand/nfs.c
@@ -577,7 +577,7 @@ nfs_read(struct open_file *f, void *buf, size_t size, size_t *resid)
#endif
while ((int)size > 0) {
twiddle();
- cc = nfs_readdata(fp, fp->off, (void *)addr, size);
+ cc = nfs_readdata(fp, fp->off, addr, size);
/* XXX maybe should retry on certain errors */
if (cc == -1) {
#ifdef NFS_DEBUG
View
4 lib/libstand/printf.c
@@ -100,7 +100,7 @@ sprintf(char *buf, const char *cfmt, ...)
va_list ap;
va_start(ap, cfmt);
- retval = kvprintf(cfmt, NULL, (void *)buf, 10, ap);
+ retval = kvprintf(cfmt, NULL, buf, 10, ap);
buf[retval] = '\0';
va_end(ap);
return retval;
@@ -111,7 +111,7 @@ vsprintf(char *buf, const char *cfmt, va_list ap)
{
int retval;
- retval = kvprintf(cfmt, NULL, (void *)buf, 10, ap);
+ retval = kvprintf(cfmt, NULL, buf, 10, ap);
buf[retval] = '\0';
}
View
2  lib/libtcplay/hdr.c
@@ -100,7 +100,7 @@ verify_hdr(struct tchdr_dec *hdr)
return 0;
}
- crc = crc32((void *)&hdr->keys, 256);
+ crc = crc32(&hdr->keys, 256);
if (crc != hdr->crc_keys) {
#ifdef DEBUG
fprintf(stderr, "CRC32 mismatch (crc_keys)\n");
View
6 lib/libtelnet/sra.c
@@ -26,9 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- *
* $FreeBSD: src/crypto/telnet/libtelnet/sra.c,v 1.1.2.7 2002/05/16 08:46:49 markm Exp $
- * $DragonFly: src/crypto/telnet/libtelnet/sra.c,v 1.3 2006/01/17 23:50:34 dillon Exp $
*/
#ifdef SRA
@@ -290,7 +288,7 @@ sra_reply(Authenticator *ap, unsigned char *data, int cnt)
/* send it off */
if (auth_debug_mode)
printf("Sent KAB(U)\r\n");
- if (!Data(ap, SRA_USER, (void *)xuser, strlen(xuser))) {
+ if (!Data(ap, SRA_USER, xuser, strlen(xuser))) {
if (auth_debug_mode)
printf("Not enough room\r\n");
return;
@@ -310,7 +308,7 @@ sra_reply(Authenticator *ap, unsigned char *data, int cnt)
/* send it off */
if (auth_debug_mode)
printf("Sent KAB(P)\r\n");
- if (!Data(ap, SRA_PASS, (void *)xpass, strlen(xpass))) {
+ if (!Data(ap, SRA_PASS, xpass, strlen(xpass))) {
if (auth_debug_mode)
printf("Not enough room\r\n");
return;
View
3  libexec/mknetid/hash.c
@@ -30,7 +30,6 @@
* SUCH DAMAGE.
*
* $FreeBSD: src/libexec/mknetid/hash.c,v 1.5 1999/08/28 00:09:40 peter Exp $
- * $DragonFly: src/libexec/mknetid/hash.c,v 1.2 2003/06/17 04:27:07 dillon Exp $
*/
#include <stdio.h>
@@ -104,7 +103,7 @@ hashkey(char *key)
if (key == NULL)
return (-1);
- return(hash((void *)key, strlen(key)) & HASH_MASK);
+ return(hash(key, strlen(key)) & HASH_MASK);
}
/* Find an entry in the hash table (may be hanging off a linked list). */
View
3  libexec/revnetgroup/hash.c
@@ -30,7 +30,6 @@
* SUCH DAMAGE.
*
* $FreeBSD: src/libexec/revnetgroup/hash.c,v 1.6 1999/08/28 00:09:47 peter Exp $
- * $DragonFly: src/libexec/revnetgroup/hash.c,v 1.3 2008/11/19 17:46:55 swildner Exp $
*/
#include <stdio.h>
@@ -104,7 +103,7 @@ hashkey(char *key)
if (key == NULL)
return (-1);
- return(hash((void *)key, strlen(key)) & HASH_MASK);
+ return(hash(key, strlen(key)) & HASH_MASK);
}
/* Find an entry in the hash table (may be hanging off a linked list). */
View
22 sbin/ffsinfo/ffsinfo.c
@@ -37,7 +37,6 @@
*
* $TSHeader: src/sbin/ffsinfo/ffsinfo.c,v 1.4 2000/12/12 19:30:55 tomsoft Exp $
* $FreeBSD: src/sbin/ffsinfo/ffsinfo.c,v 1.3.2.1 2001/07/16 15:01:56 tomsoft Exp $
- * $DragonFly: src/sbin/ffsinfo/ffsinfo.c,v 1.5 2007/05/20 23:21:35 dillon Exp $
*
* @(#) Copyright (c) 2000 Christoph Herrmann, Thomas-Henning von Kamptz Copyright (c) 1980, 1989, 1993 The Regents of the University of California. All rights reserved.
* $FreeBSD: src/sbin/ffsinfo/ffsinfo.c,v 1.3.2.1 2001/07/16 15:01:56 tomsoft Exp $
@@ -271,7 +270,7 @@ main(int argc, char **argv)
/*
* Read the current superblock.
*/
- rdfs((daddr_t)(SBOFF/DEV_BSIZE), (size_t)SBSIZE, (void *)&sblock, fsi);
+ rdfs((daddr_t)(SBOFF/DEV_BSIZE), (size_t)SBSIZE, &sblock, fsi);
if (sblock.fs_magic != FS_MAGIC) {
errx(1, "superblock not recognized");
}
@@ -340,7 +339,7 @@ main(int argc, char **argv)
* ... dump the superblock copies ...
*/
rdfs(fsbtodb(&sblock, cgsblock(&sblock, cylno)),
- (size_t)SBSIZE, (void *)&osblock, fsi);
+ (size_t)SBSIZE, &osblock, fsi);
DBG_DUMP_FS(&osblock,
dbg_line);
}
@@ -348,7 +347,7 @@ main(int argc, char **argv)
* ... read the cylinder group and dump whatever was requested.
*/
rdfs(fsbtodb(&sblock, cgtod(&sblock, cylno)),
- (size_t)sblock.fs_cgsize, (void *)&acg, fsi);
+ (size_t)sblock.fs_cgsize, &acg, fsi);
if(cfg_lv & 0x008) {
DBG_DUMP_CG(&sblock,
dbg_line,
@@ -449,7 +448,7 @@ dump_whole_inode(ino_t inode, int fsi, int level)
* Dump single indirect block.
*/
rdfs(fsbtodb(&sblock, ino->di_ib[0]), (size_t)sblock.fs_bsize,
- (void *)&i1blk, fsi);
+ &i1blk, fsi);
snprintf(comment, sizeof(comment), "Inode 0x%08jx: indirect 0",
(uintmax_t)inode);
DBG_DUMP_IBLK(&sblock,
@@ -463,7 +462,7 @@ dump_whole_inode(ino_t inode, int fsi, int level)
* Dump double indirect blocks.
*/
rdfs(fsbtodb(&sblock, ino->di_ib[1]), (size_t)sblock.fs_bsize,
- (void *)&i2blk, fsi);
+ &i2blk, fsi);
snprintf(comment, sizeof(comment), "Inode 0x%08jx: indirect 1",
(uintmax_t)inode);
DBG_DUMP_IBLK(&sblock,
@@ -475,7 +474,7 @@ dump_whole_inode(ino_t inode, int fsi, int level)
ind2ptr=&((ufs_daddr_t *)(void *)&i2blk)[ind2ctr];
rdfs(fsbtodb(&sblock, *ind2ptr),
- (size_t)sblock.fs_bsize, (void *)&i1blk, fsi);
+ (size_t)sblock.fs_bsize, &i1blk, fsi);
snprintf(comment, sizeof(comment),
"Inode 0x%08jx: indirect 1->%d", (uintmax_t)inode,
ind2ctr);
@@ -491,7 +490,7 @@ dump_whole_inode(ino_t inode, int fsi, int level)
* Dump triple indirect blocks.
*/
rdfs(fsbtodb(&sblock, ino->di_ib[2]), (size_t)sblock.fs_bsize,
- (void *)&i3blk, fsi);
+ &i3blk, fsi);
snprintf(comment, sizeof(comment), "Inode 0x%08jx: indirect 2",
(uintmax_t)inode);
#define SQUARE(a) ((a)*(a))
@@ -506,7 +505,7 @@ dump_whole_inode(ino_t inode, int fsi, int level)
ind3ptr=&((ufs_daddr_t *)(void *)&i3blk)[ind3ctr];
rdfs(fsbtodb(&sblock, *ind3ptr),
- (size_t)sblock.fs_bsize, (void *)&i2blk, fsi);
+ (size_t)sblock.fs_bsize, &i2blk, fsi);
snprintf(comment, sizeof(comment),
"Inode 0x%08jx: indirect 2->%d", (uintmax_t)inode,
ind3ctr);
@@ -520,8 +519,7 @@ dump_whole_inode(ino_t inode, int fsi, int level)
ind2ptr=&((ufs_daddr_t *)(void *)&i2blk)
[ind2ctr];
rdfs(fsbtodb(&sblock, *ind2ptr),
- (size_t)sblock.fs_bsize, (void *)&i1blk,
- fsi);
+ (size_t)sblock.fs_bsize, &i1blk, fsi);
snprintf(comment, sizeof(comment),
"Inode 0x%08jx: indirect 2->%d->%d",
(uintmax_t)inode, ind3ctr, ind3ctr);
@@ -586,7 +584,7 @@ ginode(ino_t inumber, int fsi)
*/
iblk = ino_to_fsba(&sblock, inumber);
rdfs(fsbtodb(&sblock, iblk), (size_t)sblock.fs_bsize,
- (void *)&ablk, fsi);
+ &ablk, fsi);
startinum = (inumber / INOPB(&sblock)) * INOPB(&sblock);
}
View
47 sbin/growfs/growfs.c
@@ -283,7 +283,7 @@ growfs(int fsi, int fso, unsigned int Nflag)
* Now write the new superblock back to disk.
*/
sblock.fs_time = utime;
- wtfs((daddr_t)(SBOFF / DEV_BSIZE), (size_t)SBSIZE, (void *)&sblock,
+ wtfs((daddr_t)(SBOFF / DEV_BSIZE), (size_t)SBSIZE, &sblock,
fso, Nflag);
DBG_PRINT0("sblock written\n");
DBG_DUMP_FS(&sblock,
@@ -326,7 +326,7 @@ growfs(int fsi, int fso, unsigned int Nflag)
*/
for (cylno = 0; cylno < sblock.fs_ncg; cylno++) {
wtfs(fsbtodb(&sblock, cgsblock(&sblock, cylno)),
- (size_t)SBSIZE, (void *)&sblock, fso, Nflag);
+ (size_t)SBSIZE, &sblock, fso, Nflag);
}
DBG_PRINT0("sblock copies written\n");
DBG_DUMP_FS(&sblock,
@@ -501,7 +501,7 @@ initcg(int cylno, time_t utime, int fso, unsigned int Nflag)
sblock.fs_cstotal.cs_nifree += acg.cg_cs.cs_nifree;
*cs = acg.cg_cs;
wtfs(fsbtodb(&sblock, cgtod(&sblock, cylno)),
- (size_t)sblock.fs_bsize, (void *)&acg, fso, Nflag);
+ (size_t)sblock.fs_bsize, &acg, fso, Nflag);
DBG_DUMP_CG(&sblock,
"new cg",
&acg);
@@ -630,7 +630,7 @@ cond_bl_upd(ufs_daddr_t *block, struct gfs_bpp *field,
* implement copy on write here in case
* of active snapshots.
*/
- wtfs(dst, (size_t)sblock.fs_bsize, (void *)src,
+ wtfs(dst, (size_t)sblock.fs_bsize, src,
fso, Nflag);
}
@@ -674,7 +674,7 @@ updjcg(int cylno, time_t utime, int fsi, int fso, unsigned int Nflag)
* a copy.
*/
rdfs(fsbtodb(&osblock, cgtod(&osblock, cylno)),
- (size_t)osblock.fs_cgsize, (void *)&aocg, fsi);
+ (size_t)osblock.fs_cgsize, &aocg, fsi);
DBG_PRINT0("jcg read\n");
DBG_DUMP_CG(&sblock,
"old joining cg",
@@ -694,7 +694,7 @@ updjcg(int cylno, time_t utime, int fsi, int fso, unsigned int Nflag)
acg.cg_ncyl=sblock.fs_cpg;
wtfs(fsbtodb(&sblock, cgtod(&sblock, cylno)),
- (size_t)sblock.fs_cgsize, (void *)&acg, fso, Nflag);
+ (size_t)sblock.fs_cgsize, &acg, fso, Nflag);
DBG_PRINT0("jcg written\n");
DBG_DUMP_CG(&sblock,
"new joining cg",
@@ -884,7 +884,7 @@ updjcg(int cylno, time_t utime, int fsi, int fso, unsigned int Nflag)
* Write the updated "joining" cylinder group back to disk.
*/
wtfs(fsbtodb(&sblock, cgtod(&sblock, cylno)), (size_t)sblock.fs_cgsize,
- (void *)&acg, fso, Nflag);
+ &acg, fso, Nflag);
DBG_PRINT0("jcg written\n");
DBG_DUMP_CG(&sblock,
"new joining cg",
@@ -948,7 +948,7 @@ updcsloc(time_t utime, int fsi, int fso, unsigned int Nflag)
* block from disk.
*/
rdfs(fsbtodb(&osblock, cgtod(&osblock, ocscg)),
- (size_t)osblock.fs_cgsize, (void *)&aocg, fsi);
+ (size_t)osblock.fs_cgsize, &aocg, fsi);
DBG_PRINT0("oscg read\n");
DBG_DUMP_CG(&sblock,
"old summary cg",
@@ -1112,7 +1112,7 @@ updcsloc(time_t utime, int fsi, int fso, unsigned int Nflag)
* summary back to disk.
*/
wtfs(fsbtodb(&sblock, cgtod(&sblock, ocscg)),
- (size_t)sblock.fs_cgsize, (void *)&acg, fso, Nflag);
+ (size_t)sblock.fs_cgsize, &acg, fso, Nflag);
DBG_PRINT0("oscg written\n");
DBG_DUMP_CG(&sblock,
"old summary cg",
@@ -1143,7 +1143,7 @@ updcsloc(time_t utime, int fsi, int fso, unsigned int Nflag)
* summary from disk, and make a copy.
*/
rdfs(fsbtodb(&sblock, cgtod(&sblock, ncscg)),
- (size_t)sblock.fs_cgsize, (void *)&aocg, fsi);
+ (size_t)sblock.fs_cgsize, &aocg, fsi);
DBG_PRINT0("nscg read\n");
DBG_DUMP_CG(&sblock,
"new summary cg",
@@ -1219,7 +1219,7 @@ updcsloc(time_t utime, int fsi, int fso, unsigned int Nflag)
* back to disk.
*/
wtfs(fsbtodb(&sblock, cgtod(&sblock, ncscg)),
- (size_t)sblock.fs_cgsize, (void *)&acg, fso, Nflag);
+ (size_t)sblock.fs_cgsize, &acg, fso, Nflag);
DBG_PRINT0("nscg written\n");
DBG_DUMP_CG(&sblock,
"new summary cg",
@@ -1477,9 +1477,9 @@ updcsloc(time_t utime, int fsi, int fso, unsigned int Nflag)
* in the case we have any active snapshots.
*/
rdfs(fsbtodb(&sblock, bp[i].old*sblock.fs_frag),
- (size_t)sblock.fs_bsize, (void *)&ablk, fsi);
+ (size_t)sblock.fs_bsize, &ablk, fsi);
wtfs(fsbtodb(&sblock, bp[i].new*sblock.fs_frag),
- (size_t)sblock.fs_bsize, (void *)&ablk, fso, Nflag);
+ (size_t)sblock.fs_bsize, &ablk, fso, Nflag);
DBG_DUMP_HEX(&sblock,
"copied full block",
(unsigned char *)&ablk);
@@ -1532,7 +1532,7 @@ updcsloc(time_t utime, int fsi, int fso, unsigned int Nflag)
* Write summary cylinder group back to disk.
*/
wtfs(fsbtodb(&sblock, cgtod(&sblock, ocscg)), (size_t)sblock.fs_cgsize,
- (void *)&acg, fso, Nflag);
+ &acg, fso, Nflag);
DBG_PRINT0("scg written\n");
DBG_DUMP_CG(&sblock,
"new summary cg",
@@ -1865,7 +1865,7 @@ ginode(ino_t inumber, int fsi, int cg)
*/
iblk = ino_to_fsba(&sblock, inumber);
in_src=fsbtodb(&sblock, iblk);
- rdfs(in_src, (size_t)sblock.fs_bsize, (void *)&ablk, fsi);
+ rdfs(in_src, (size_t)sblock.fs_bsize, &ablk, fsi);
startinum = (inumber / INOPB(&sblock)) * INOPB(&sblock);
}
@@ -2056,8 +2056,7 @@ main(int argc, char **argv)
/*
* Read the current superblock, and take a backup.
*/
- rdfs((daddr_t)(SBOFF/DEV_BSIZE), (size_t)SBSIZE, (void *)&(osblock),
- fsi);
+ rdfs((daddr_t)(SBOFF/DEV_BSIZE), (size_t)SBSIZE, &osblock, fsi);
if (osblock.fs_magic != FS_MAGIC) {
errx(1, "superblock not recognized");
}
@@ -2125,7 +2124,7 @@ main(int argc, char **argv)
* later on realize we have to abort our operation, on that block
* there should be no data, so we can't destroy something yet.
*/
- wtfs((daddr_t)pinfo.media_blocks-1, (size_t)DEV_BSIZE, (void *)&sblock, fso,
+ wtfs((daddr_t)pinfo.media_blocks-1, (size_t)DEV_BSIZE, &sblock, fso,
Nflag);
/*
@@ -2333,7 +2332,7 @@ updrefs(int cg, ino_t in, struct gfs_bpp *bp, int fsi, int fso, unsigned int
*/
cond_bl_upd(&(ino->di_ib[0]), bp, GFS_PS_INODE, fso, Nflag);
i1_src=fsbtodb(&sblock, ino->di_ib[0]);
- rdfs(i1_src, (size_t)sblock.fs_bsize, (void *)&i1blk, fsi);
+ rdfs(i1_src, (size_t)sblock.fs_bsize, &i1blk, fsi);
for(ictr=0; ictr < MIN(howmany(sblock.fs_bsize,
sizeof(ufs_daddr_t)), (unsigned int)remaining_blocks);
ictr++) {
@@ -2357,7 +2356,7 @@ updrefs(int cg, ino_t in, struct gfs_bpp *bp, int fsi, int fso, unsigned int
*/
cond_bl_upd(&(ino->di_ib[1]), bp, GFS_PS_INODE, fso, Nflag);
i2_src=fsbtodb(&sblock, ino->di_ib[1]);
- rdfs(i2_src, (size_t)sblock.fs_bsize, (void *)&i2blk, fsi);
+ rdfs(i2_src, (size_t)sblock.fs_bsize, &i2blk, fsi);
for(ind2ctr=0; ind2ctr < howmany(sblock.fs_bsize,
sizeof(ufs_daddr_t)); ind2ctr++) {
ind2ptr=&((ufs_daddr_t *)(void *)&i2blk)[ind2ctr];
@@ -2367,7 +2366,7 @@ updrefs(int cg, ino_t in, struct gfs_bpp *bp, int fsi, int fso, unsigned int
cond_bl_upd(ind2ptr, bp, GFS_PS_IND_BLK_LVL2, fso,
Nflag);
i1_src=fsbtodb(&sblock, *ind2ptr);
- rdfs(i1_src, (size_t)sblock.fs_bsize, (void *)&i1blk,
+ rdfs(i1_src, (size_t)sblock.fs_bsize, &i1blk,
fsi);
for(ictr=0; ictr<MIN(howmany((unsigned int)
sblock.fs_bsize, sizeof(ufs_daddr_t)),
@@ -2396,7 +2395,7 @@ updrefs(int cg, ino_t in, struct gfs_bpp *bp, int fsi, int fso, unsigned int
*/
cond_bl_upd(&(ino->di_ib[2]), bp, GFS_PS_INODE, fso, Nflag);
i3_src=fsbtodb(&sblock, ino->di_ib[2]);
- rdfs(i3_src, (size_t)sblock.fs_bsize, (void *)&i3blk, fsi);
+ rdfs(i3_src, (size_t)sblock.fs_bsize, &i3blk, fsi);
for(ind3ctr=0; ind3ctr < howmany(sblock.fs_bsize,
sizeof(ufs_daddr_t)); ind3ctr ++) {
ind3ptr=&((ufs_daddr_t *)(void *)&i3blk)[ind3ctr];
@@ -2406,7 +2405,7 @@ updrefs(int cg, ino_t in, struct gfs_bpp *bp, int fsi, int fso, unsigned int
cond_bl_upd(ind3ptr, bp, GFS_PS_IND_BLK_LVL3, fso,
Nflag);
i2_src=fsbtodb(&sblock, *ind3ptr);
- rdfs(i2_src, (size_t)sblock.fs_bsize, (void *)&i2blk,
+ rdfs(i2_src, (size_t)sblock.fs_bsize, &i2blk,
fsi);
for(ind2ctr=0; ind2ctr < howmany(sblock.fs_bsize,
sizeof(ufs_daddr_t)); ind2ctr ++) {
@@ -2419,7 +2418,7 @@ updrefs(int cg, ino_t in, struct gfs_bpp *bp, int fsi, int fso, unsigned int
fso, Nflag);
i1_src=fsbtodb(&sblock, *ind2ptr);
rdfs(i1_src, (size_t)sblock.fs_bsize,
- (void *)&i1blk, fsi);
+ &i1blk, fsi);
for(ictr=0; ictr < MIN(howmany(sblock.fs_bsize,
sizeof(ufs_daddr_t)),
(unsigned int)remaining_blocks); ictr++) {
View
3  sys/boot/efi/libefi/bootinfo.c
@@ -24,7 +24,6 @@
* SUCH DAMAGE.
*
* $FreeBSD$
- * $DragonFly: src/sys/boot/efi/libefi/bootinfo.c,v 1.1 2003/11/10 06:08:32 dillon Exp $
*/
#include <stand.h>
@@ -288,7 +287,7 @@ bi_load(struct bootinfo *bi, struct preloaded_file *fp, UINTN *mapkey,
}
/* Try reading the /etc/fstab file to select the root device */
- getrootmount(efi_fmtdev((void *)rootdev));
+ getrootmount(efi_fmtdev(rootdev));
free(rootdev);
ssym = esym = 0;
View
3  sys/boot/pc32/libi386/bootinfo32.c
@@ -24,7 +24,6 @@
* SUCH DAMAGE.
*
* $FreeBSD: src/sys/boot/i386/libi386/bootinfo32.c,v 1.36 2003/08/25 23:28:31 obrien Exp $
- * $DragonFly: src/sys/boot/pc32/libi386/bootinfo32.c,v 1.1 2003/11/10 06:08:36 dillon Exp $
*/
#include <stand.h>
@@ -162,7 +161,7 @@ bi_load32(char *args, int *howtop, int *bootdevp, vm_offset_t *bip, vm_offset_t
}
/* Try reading the /etc/fstab file to select the root device */
- getrootmount(i386_fmtdev((void *)rootdev));
+ getrootmount(i386_fmtdev(rootdev));
/* Do legacy rootdev guessing */
View
3  sys/boot/pc32/libi386/bootinfo64.c
@@ -24,7 +24,6 @@
* SUCH DAMAGE.
*
* $FreeBSD: src/sys/boot/i386/libi386/bootinfo64.c,v 1.36 2003/08/25 23:28:31 obrien Exp $
- * $DragonFly: src/sys/boot/pc32/libi386/bootinfo64.c,v 1.1 2003/11/10 06:08:36 dillon Exp $
*/
#include <stand.h>
@@ -206,7 +205,7 @@ bi_load64(char *args, vm_offset_t *modulep, vm_offset_t *kernendp)
}
/* Try reading the /etc/fstab file to select the root device */
- getrootmount(i386_fmtdev((void *)rootdev));
+ getrootmount(i386_fmtdev(rootdev));
/* find the last module in the chain */
addr = 0;
View
2  sys/dev/drm/drm_irq.c
@@ -101,7 +101,7 @@ void drm_vblank_cleanup(struct drm_device *dev)
callout_stop(&dev->vblank_disable_timer);
DRM_SPINUNLOCK(&dev->vbl_lock);
- vblank_disable_fn((void *)dev);
+ vblank_disable_fn(dev);
free(dev->vblank, DRM_MEM_DRIVER);
View
6 sys/dev/misc/kbd/kbd.c
@@ -727,7 +727,7 @@ genkbdopen(struct dev_open_args *ap)
return ENXIO;
}
i = kbd_allocate(kbd->kb_name, kbd->kb_unit, sc,
- genkbd_event, (void *)sc);
+ genkbd_event, sc);
if (i < 0) {
lwkt_reltoken(&tty_token);
crit_exit();
@@ -766,7 +766,7 @@ genkbdclose(struct dev_close_args *ap)
if ((sc == NULL) || (kbd == NULL) || !KBD_IS_VALID(kbd)) {
/* XXX: we shall be forgiving and don't report error... */
} else {
- kbd_release(kbd, (void *)sc);
+ kbd_release(kbd, sc);
}
lwkt_reltoken(&tty_token);
crit_exit();
@@ -956,7 +956,7 @@ genkbd_event(keyboard_t *kbd, int event, void *arg)
break;
case KBDIO_UNLOADING:
/* the keyboard is going... */
- kbd_release(kbd, (void *)sc);
+ kbd_release(kbd, sc);
if (sc->gkb_flags & KB_ASLEEP) {
sc->gkb_flags &= ~KB_ASLEEP;
wakeup((caddr_t)sc);
View
18 sys/dev/netif/axe/if_axe.c
@@ -227,7 +227,7 @@ axe_miibus_readreg(device_t dev, int phy, int reg)
}
axe_cmd(sc, AXE_CMD_MII_OPMODE_SW, 0, 0, NULL);
- err = axe_cmd(sc, AXE_CMD_MII_READ_REG, reg, phy, (void *)&val);
+ err = axe_cmd(sc, AXE_CMD_MII_READ_REG, reg, phy, &val);
axe_cmd(sc, AXE_CMD_MII_OPMODE_HW, 0, 0, NULL);
if (err) {
@@ -252,7 +252,7 @@ axe_miibus_writereg(device_t dev, int phy, int reg, int val)
}
axe_cmd(sc, AXE_CMD_MII_OPMODE_SW, 0, 0, NULL);
- err = axe_cmd(sc, AXE_CMD_MII_WRITE_REG, reg, phy, (void *)&val);
+ err = axe_cmd(sc, AXE_CMD_MII_WRITE_REG, reg, phy, &val);
axe_cmd(sc, AXE_CMD_MII_OPMODE_HW, 0, 0, NULL);
if (err) {
@@ -320,7 +320,7 @@ axe_setmulti(struct axe_softc *sc)
u_int16_t rxmode;
u_int8_t hashtbl[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
- axe_cmd(sc, AXE_CMD_RXCTL_READ, 0, 0, (void *)&rxmode);
+ axe_cmd(sc, AXE_CMD_RXCTL_READ, 0, 0, &rxmode);
if (ifp->if_flags & IFF_ALLMULTI || ifp->if_flags & IFF_PROMISC) {
rxmode |= AXE_RXCMD_ALLMULTI;
@@ -340,7 +340,7 @@ axe_setmulti(struct axe_softc *sc)
hashtbl[h / 8] |= 1 << (h % 8);
}
- axe_cmd(sc, AXE_CMD_WRITE_MCAST, 0, 0, (void *)&hashtbl);
+ axe_cmd(sc, AXE_CMD_WRITE_MCAST, 0, 0, &hashtbl);
axe_cmd(sc, AXE_CMD_RXCTL_WRITE, 0, rxmode, NULL);
}
@@ -436,8 +436,8 @@ axe_attach(device_t self)
/*
* Load IPG values and PHY indexes.
*/
- axe_cmd(sc, AXE_CMD_READ_IPG012, 0, 0, (void *)&sc->axe_ipgs);
- axe_cmd(sc, AXE_CMD_READ_PHYID, 0, 0, (void *)&sc->axe_phyaddrs);
+ axe_cmd(sc, AXE_CMD_READ_IPG012, 0, 0, &sc->axe_ipgs);
+ axe_cmd(sc, AXE_CMD_READ_PHYID, 0, 0, &sc->axe_phyaddrs);
/*
* Work around broken adapters that appear to lie about
@@ -896,8 +896,7 @@ axe_ioctl(struct ifnet *ifp, u_long command, caddr_t data, struct ucred *cr)
if (ifp->if_flags & IFF_RUNNING &&
ifp->if_flags & IFF_PROMISC &&
!(sc->axe_if_flags & IFF_PROMISC)) {
- axe_cmd(sc, AXE_CMD_RXCTL_READ,
- 0, 0, (void *)&rxmode);
+ axe_cmd(sc, AXE_CMD_RXCTL_READ, 0, 0, &rxmode);
rxmode |= AXE_RXCMD_PROMISC;
axe_cmd(sc, AXE_CMD_RXCTL_WRITE,
0, rxmode, NULL);
@@ -905,8 +904,7 @@ axe_ioctl(struct ifnet *ifp, u_long command, caddr_t data, struct ucred *cr)
} else if (ifp->if_flags & IFF_RUNNING &&
!(ifp->if_flags & IFF_PROMISC) &&
sc->axe_if_flags & IFF_PROMISC) {
- axe_cmd(sc, AXE_CMD_RXCTL_READ,
- 0, 0, (void *)&rxmode);
+ axe_cmd(sc, AXE_CMD_RXCTL_READ, 0, 0, &rxmode);
rxmode &= ~AXE_RXCMD_PROMISC;
axe_cmd(sc, AXE_CMD_RXCTL_WRITE,
0, rxmode, NULL);
View
12 sys/dev/netif/tl/if_tl.c
@@ -1624,17 +1624,17 @@ tl_intr(void *xsc)
r = 0;
break;
case (TL_INTR_TXEOF):
- r = tl_intvec_txeof((void *)sc, type);
+ r = tl_intvec_txeof(sc, type);
break;
case (TL_INTR_TXEOC):
- r = tl_intvec_txeoc((void *)sc, type);
+ r = tl_intvec_txeoc(sc, type);
break;
case (TL_INTR_STATOFLOW):
tl_stats_update_serialized(sc);
r = 1;
break;
case (TL_INTR_RXEOF):
- r = tl_intvec_rxeof((void *)sc, type);
+ r = tl_intvec_rxeof(sc, type);
break;
case (TL_INTR_DUMMY):
if_printf(ifp, "got a dummy interrupt\n");
@@ -1642,12 +1642,12 @@ tl_intr(void *xsc)
break;
case (TL_INTR_ADCHK):
if (ivec)
- r = tl_intvec_adchk((void *)sc, type);
+ r = tl_intvec_adchk(sc, type);
else
- r = tl_intvec_netsts((void *)sc, type);
+ r = tl_intvec_netsts(sc, type);
break;
case (TL_INTR_RXEOC):
- r = tl_intvec_rxeoc((void *)sc, type);
+ r = tl_intvec_rxeoc(sc, type);
break;
default:
if_printf(ifp, "bogus interrupt type\n");
View
2  sys/dev/raid/mfi/mfi_tbolt.c
@@ -542,7 +542,7 @@ int mfi_tbolt_reset(struct mfi_softc *sc)
sc->issuepend_done = 0;
sc->MFA_enabled = 0;
sc->last_reply_idx = 0;
- mfi_process_fw_state_chg_isr((void *) sc);
+ mfi_process_fw_state_chg_isr(sc);
}
lockmgr(&sc->mfi_io_lock, LK_RELEASE);
return 0;
View
2  sys/dev/raid/mly/mly.c
@@ -305,7 +305,7 @@ mly_attach(device_t dev)
* happen until interrupts are enabled, which should still be before
* the SCSI subsystem gets to us, courtesy of the "SCSI settling delay".
*/
- mly_periodic((void *)sc);
+ mly_periodic(sc);
/*
* Create the control device.
View
12 sys/dev/raid/tws/tws_cam.c
@@ -474,7 +474,7 @@ tws_aen_complete(struct tws_request *req)
if ( aen_code != TWS_AEN_QUEUE_EMPTY ) {
/* timeout(tws_fetch_aen, sc, 1);*/
sc->stats.num_aens++;
- tws_fetch_aen((void *)sc);
+ tws_fetch_aen(sc);
}
}
@@ -1037,10 +1037,10 @@ tws_dmamap_data_load_cbfn(void *arg, bus_dma_segment_t *segs,
sgl_ptr = (u_int32_t *)(gcmd) + gcmd->size;
gcmd->size += sgls *
((req->sc->is64bit && !tws_use_32bit_sgls) ? 4 :2 );
- tws_fill_sg_list(req->sc, (void *)segs, sgl_ptr, sgls);
+ tws_fill_sg_list(req->sc, segs, sgl_ptr, sgls);
} else {
- tws_fill_sg_list(req->sc, (void *)segs,
+ tws_fill_sg_list(req->sc, segs,
(void *)req->cmd_pkt->cmd.pkt_a.sg_list, sgls);
req->cmd_pkt->cmd.pkt_a.lun_h4__sgl_entries |= sgls ;
}
@@ -1136,7 +1136,7 @@ tws_intr_attn_aen(struct tws_softc *sc)
/* maskoff db intrs untill all the aens are fetched */
/* tws_disable_db_intr(sc); */
- tws_fetch_aen((void *)sc);
+ tws_fetch_aen(sc);
tws_write_reg(sc, TWS_I2O0_HOBDBC, TWS_BIT18, 4);
db = tws_read_reg(sc, TWS_I2O0_IOBDB, 4);
@@ -1180,7 +1180,7 @@ tws_poll(struct cam_sim *sim)
{
struct tws_softc *sc = (struct tws_softc *)cam_sim_softc(sim);
TWS_TRACE_DEBUG(sc, "entry", 0, 0);
- tws_intr((void *) sc);
+ tws_intr(sc);
}
void
@@ -1192,7 +1192,7 @@ tws_timeout(void *arg)
if ( tws_get_state(sc) != TWS_RESET ) {
device_printf(sc->tws_dev, "Request timed out.\n");
- tws_reset((void *)sc);
+ tws_reset(sc);
}
}
View
2  sys/dev/raid/tws/tws_user.c
@@ -143,7 +143,7 @@ tws_passthru(struct tws_softc *sc, void *buf)
if ( error == EWOULDBLOCK ) {
error = ETIMEDOUT;
TWS_TRACE_DEBUG(sc, "lksleep timeout", error, req->request_id);
- tws_reset((void *)sc);
+ tws_reset(sc);
}
if ( req->error_code == TWS_REQ_REQUEUE ) {
View
2  sys/dev/sound/pci/hda/hdac.c
@@ -3922,7 +3922,7 @@ hdac_attach(device_t dev)
sc->intrhook.ich_desc = "snd_hda";
if (cold == 0 || config_intrhook_establish(&sc->intrhook) != 0) {
sc->intrhook.ich_func = NULL;
- hdac_attach2((void *)sc);
+ hdac_attach2(sc);
}
return (0);
View
2  sys/dev/usbmisc/ukbd/ukbd.c
@@ -615,7 +615,7 @@ ukbd_init(int unit, keyboard_t **kbdp, void *arg, int flags)
return ENXIO;
}
if (ukbd_enable_intr(kbd, TRUE, (usbd_intr_t *)data[1]) == 0)
- ukbd_timeout((void *)kbd);
+ ukbd_timeout(kbd);
KBD_CONFIG_DONE(kbd);
}
View
2  sys/dev/usbmisc/umass/umass.c
@@ -3078,7 +3078,7 @@ umass_cam_action(struct cam_sim *sim, union ccb *ccb)
ccb->ccb_h.target_id, ccb->ccb_h.target_lun));
ccb->ccb_h.status = CAM_REQ_INPROG;
- umass_reset(sc, umass_cam_cb, (void *) ccb);
+ umass_reset(sc, umass_cam_cb, ccb);
break;
}
case XPT_GET_TRAN_SETTINGS:
View
3  sys/kern/kern_sysctl.c
@@ -1055,8 +1055,7 @@ kernel_sysctlbyname(char *name, void *old, size_t *oldlenp,
oid[1] = 3; /* name2oid */
oidlen = sizeof(oid);
- error = kernel_sysctl(oid, 2, oid, &oidlen, (void *)name,
- strlen(name), &plen);
+ error = kernel_sysctl(oid, 2, oid, &oidlen, name, strlen(name), &plen);
if (error)
return (error);
View
4 sys/kern/subr_prf.c
@@ -397,7 +397,7 @@ ksprintf(char *buf, const char *cfmt, ...)
__va_list ap;
__va_start(ap, cfmt);
- retval = kvcprintf(cfmt, NULL, (void *)buf, 10, ap);
+ retval = kvcprintf(cfmt, NULL, buf, 10, ap);
buf[retval] = '\0';
__va_end(ap);
return (retval);
@@ -411,7 +411,7 @@ kvsprintf(char *buf, const char *cfmt, __va_list ap)
{
int retval;
- retval = kvcprintf(cfmt, NULL, (void *)buf, 10, ap);
+ retval = kvcprintf(cfmt, NULL, buf, 10, ap);
buf[retval] = '\0';
return (retval);
}
View
4 sys/netinet/sctp_output.c
@@ -7310,7 +7310,7 @@ sctp_output(struct sctp_inpcb *inp, struct mbuf *m, struct sockaddr *addr,
}
if (control) {
sctppcbinfo.mbuf_track++;
- if (sctp_find_cmsg(SCTP_SNDRCV, (void *)&srcv, control,
+ if (sctp_find_cmsg(SCTP_SNDRCV, &srcv, control,
sizeof(srcv))) {
if (srcv.sinfo_flags & MSG_SENDALL) {
/* its a sendall */
@@ -7481,7 +7481,7 @@ sctp_output(struct sctp_inpcb *inp, struct mbuf *m, struct sockaddr *addr,
/* see if a init structure exists in cmsg headers */
struct sctp_initmsg initm;
int i;
- if (sctp_find_cmsg(SCTP_INIT, (void *)&initm, control,
+ if (sctp_find_cmsg(SCTP_INIT, &initm, control,
sizeof(initm))) {
/* we have an INIT override of the default */
if (initm.sinit_max_attempts)
View
8 usr.bin/lex/initscan.c
@@ -2942,7 +2942,7 @@ static int yy_get_next_buffer()
b->yy_ch_buf = (char *)
/* Include room in for 2 EOB chars. */
- yy_flex_realloc( (void *) b->yy_ch_buf,
+ yy_flex_realloc( b->yy_ch_buf,
b->yy_buf_size + 2 );
}
else
@@ -3287,9 +3287,9 @@ YY_BUFFER_STATE b;
yy_current_buffer = (YY_BUFFER_STATE) 0;
if ( b->yy_is_our_buffer )
- yy_flex_free( (void *) b->yy_ch_buf );
+ yy_flex_free( b->yy_ch_buf );
- yy_flex_free( (void *) b );
+ yy_flex_free( b );
}
@@ -3470,7 +3470,7 @@ int new_state;
else
yy_start_stack = (int *) yy_flex_realloc(
- (void *) yy_start_stack, new_size );
+ yy_start_stack, new_size );
if ( ! yy_start_stack )
YY_FATAL_ERROR(
View
7 usr.bin/truss/syscalls.c
@@ -29,7 +29,6 @@
* SUCH DAMAGE.
*
* $FreeBSD: src/usr.bin/truss/syscalls.c,v 1.10.2.6 2003/04/14 18:24:38 mdodd Exp $
- * $DragonFly: src/usr.bin/truss/syscalls.c,v 1.2 2003/06/17 04:29:33 dillon Exp $
*/
/*
@@ -297,17 +296,17 @@ print_arg(int fd, struct syscall_args *sc, unsigned long *args) {
int i;
/* yuck: get ss_len */
- if (get_struct(fd, (void *)args[sc->offset], (void *)&ss,
+ if (get_struct(fd, (void *)args[sc->offset], &ss,
sizeof(ss.ss_len) + sizeof(ss.ss_family)) == -1)
err(1, "get_struct %p", (void *)args[sc->offset]);
/* sockaddr_un never have the length filled in! */
if (ss.ss_family == AF_UNIX) {
- if (get_struct(fd, (void *)args[sc->offset], (void *)&ss,
+ if (get_struct(fd, (void *)args[sc->offset], &ss,
sizeof(*sun))
== -1)
err(2, "get_struct %p", (void *)args[sc->offset]);
} else {
- if (get_struct(fd, (void *)args[sc->offset], (void *)&ss,
+ if (get_struct(fd, (void *)args[sc->offset], &ss,
ss.ss_len < sizeof(ss) ? ss.ss_len : sizeof(ss))
== -1)
err(2, "get_struct %p", (void *)args[sc->offset]);
View
6 usr.sbin/mlxcontrol/interface.c
@@ -194,7 +194,7 @@ mlx_enquiry(int unit, struct mlx_enquiry2 *enq)
cmd.mu_command[0] = MLX_CMD_ENQUIRY2;
/* hand it off for processing */
- mlx_perform(unit, mlx_command, (void *)&cmd);
+ mlx_perform(unit, mlx_command, &cmd);
return(cmd.mu_status != 0);
}
@@ -216,7 +216,7 @@ mlx_read_configuration(int unit, struct mlx_core_cfg *cfg)
cmd.mu_command[0] = MLX_CMD_READ_CONFIG;
/* hand it off for processing */
- mlx_perform(unit, mlx_command, (void *)&cmd);
+ mlx_perform(unit, mlx_command, &cmd);
return(cmd.mu_status != 0);
}
@@ -283,7 +283,7 @@ mlx_get_device_state(int unit, int channel, int target, struct mlx_phys_drv *drv
cmd.mu_command[3] = target;
/* hand it off for processing */
- mlx_perform(unit, mlx_command, (void *)&cmd);
+ mlx_perform(unit, mlx_command, &cmd);
return(cmd.mu_status != 0);
}
View
2  usr.sbin/rtadvd/rtadvd.c
@@ -539,7 +539,7 @@ rtmsg_input(void)
rai->waiting = 0; /* XXX */
rai->timer = rtadvd_add_timer(ra_timeout,
ra_timer_update, rai, rai);
- ra_timer_update((void *)rai, &rai->timer->tm);
+ ra_timer_update(rai, &rai->timer->tm);
rtadvd_set_timer(&rai->timer->tm, rai->timer);
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.