diff options
author | nyan <nyan@FreeBSD.org> | 2003-05-03 01:47:38 +0000 |
---|---|---|
committer | nyan <nyan@FreeBSD.org> | 2003-05-03 01:47:38 +0000 |
commit | 05d34bfcac28d5a56b0369752707e8f903805899 (patch) | |
tree | 82ca6ffe9e63f02084d37d446712b6fc98d49c57 /sys/dev/snc/dp83932subr.c | |
parent | 8fc30582f40f6140dc93eac3c307c4f02429774f (diff) | |
download | FreeBSD-src-05d34bfcac28d5a56b0369752707e8f903805899.zip FreeBSD-src-05d34bfcac28d5a56b0369752707e8f903805899.tar.gz |
Fix off-by-one bug.
Submitted by: chi@bd.mbn.or.jp (Chiharu Shibata)
Diffstat (limited to 'sys/dev/snc/dp83932subr.c')
-rw-r--r-- | sys/dev/snc/dp83932subr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/snc/dp83932subr.c b/sys/dev/snc/dp83932subr.c index a83b794..fed9b73 100644 --- a/sys/dev/snc/dp83932subr.c +++ b/sys/dev/snc/dp83932subr.c @@ -629,7 +629,7 @@ snc_nec16_copyfrombuf(sc, dst, offset, size) if (size > 3) { if (noffset & 3) { - size_t asize = (~noffset & 3); + size_t asize = 4 - (noffset & 3); bus_space_read_region_1(memt, memh, noffset, bptr, asize); @@ -670,7 +670,7 @@ snc_nec16_copytobuf(sc, src, offset, size) if (size > 3) { if (noffset & 3) { - size_t asize = (~noffset & 3); + size_t asize = 4 - (noffset & 3); bus_space_write_region_1(memt, memh, noffset, bptr, asize); @@ -712,7 +712,7 @@ snc_nec16_zerobuf(sc, offset, size) if (size > 3) { if (noffset & 3) { - size_t asize = (~noffset & 3); + size_t asize = 4 - (noffset & 3); bus_space_set_region_1(memt, memh, noffset, 0, asize); noffset += asize; |