Fix `void *' arithmetic.

This commit is contained in:
mark 1999-01-09 21:18:54 +00:00
parent e6361430fc
commit 444401c526
2 changed files with 10 additions and 7 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ie.c,v 1.19 1998/08/08 23:58:40 mycroft Exp $ */
/* $NetBSD: if_ie.c,v 1.20 1999/01/09 21:18:54 mark Exp $ */
/*
* Copyright (c) 1995 Melvin Tang-Richardson.
@ -539,6 +539,7 @@ host2ie(sc, src, dest, size)
int size;
{
int cnt;
char *sptr = src;
#ifdef DIAGNOSTIC
if (size & 1)
@ -550,8 +551,8 @@ host2ie(sc, src, dest, size)
if (cnt > size)
cnt = size;
setpage(sc, dest);
PWriteShorts(src, (char *)sc->sc_ram + IE_COFF2POFF(dest), cnt);
src+=cnt;
PWriteShorts(sptr, (char *)sc->sc_ram + IE_COFF2POFF(dest), cnt);
sptr+=cnt;
dest+=cnt;
size-=cnt;
}
@ -565,6 +566,7 @@ ie2host(sc, src, dest, size)
int size;
{
int cnt;
char *dptr = dest;
#ifdef DIAGNOSTIC
if (size & 1)
@ -576,9 +578,9 @@ ie2host(sc, src, dest, size)
if (cnt > size)
cnt = size;
setpage(sc, src);
ReadShorts((char *)sc->sc_ram + IE_COFF2POFF(src), dest, cnt);
ReadShorts((char *)sc->sc_ram + IE_COFF2POFF(src), dptr, cnt);
src+=cnt;
dest+=cnt;
dptr+=cnt;
size-=cnt;
}
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: vidcaudio.c,v 1.27 1999/01/01 12:45:12 mark Exp $ */
/* $NetBSD: vidcaudio.c,v 1.28 1999/01/09 21:18:55 mark Exp $ */
/*
* Copyright (c) 1995 Melvin Tang-Richardson
@ -404,7 +404,8 @@ vidcaudio_start_output(addr, p, cc, intr, arg)
cc = NBPG;
}
}
vidcaudio_dma_program((vm_offset_t)p, (vm_offset_t)(p+cc), intr, arg);
vidcaudio_dma_program((vm_offset_t)p, (vm_offset_t)((char *)p+cc),
intr, arg);
return 0;
}