diff options
author | bde <bde@FreeBSD.org> | 1996-10-08 22:25:22 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1996-10-08 22:25:22 +0000 |
commit | 11c65a934bc02357fb7696a9427a18d63f8675a0 (patch) | |
tree | 3f2ce26e82137c31ea629c28aee5f3c98be1989f /sys/i386/boot/biosboot | |
parent | 34f60067c2b35f8be72cab3d64facb3a74e868b5 (diff) | |
download | FreeBSD-src-11c65a934bc02357fb7696a9427a18d63f8675a0.zip FreeBSD-src-11c65a934bc02357fb7696a9427a18d63f8675a0.tar.gz |
Removed unused arg to badsect(). It wasted 16 bytes.
Staticized badsect().
Avoid warning for benign signed vs unsigned comparison.
Diffstat (limited to 'sys/i386/boot/biosboot')
-rw-r--r-- | sys/i386/boot/biosboot/boot.h | 3 | ||||
-rw-r--r-- | sys/i386/boot/biosboot/disk.c | 11 |
2 files changed, 7 insertions, 7 deletions
diff --git a/sys/i386/boot/biosboot/boot.h b/sys/i386/boot/biosboot/boot.h index 4deb0d0..91551e1 100644 --- a/sys/i386/boot/biosboot/boot.h +++ b/sys/i386/boot/biosboot/boot.h @@ -24,7 +24,7 @@ * the rights to redistribute these changes. * * from: Mach, Revision 2.2 92/04/04 11:35:03 rpd - * $Id: boot.h,v 1.12 1996/09/10 21:18:38 phk Exp $ + * $Id: boot.h,v 1.13 1996/09/14 07:38:14 bde Exp $ */ #include <sys/param.h> @@ -71,7 +71,6 @@ void boot2(void); int devopen(void); void devread(char *iodest, int sector, int cnt); char * Bread(int dosdev, int sector); -int badsect(int dosdev, int sector); /* io.c */ void gateA20(void); diff --git a/sys/i386/boot/biosboot/disk.c b/sys/i386/boot/biosboot/disk.c index 1e519f6..551409f 100644 --- a/sys/i386/boot/biosboot/disk.c +++ b/sys/i386/boot/biosboot/disk.c @@ -24,7 +24,7 @@ * the rights to redistribute these changes. * * from: Mach, Revision 2.2 92/04/04 11:35:49 rpd - * $Id: disk.c,v 1.19 1996/09/11 19:23:10 phk Exp $ + * $Id: disk.c,v 1.20 1996/09/14 07:40:57 bde Exp $ */ /* @@ -75,6 +75,7 @@ static int ra_dev; static int ra_end; static int ra_first; +static int badsect(int sector); int devopen(void) @@ -174,7 +175,7 @@ devopen(void) break; } i += 2; - } while (i < 10 && i < dl->d_nsectors); + } while (i < 10 && (unsigned)i < dl->d_nsectors); if (!do_bad144) printf("Bad bad sector table\n"); else @@ -200,7 +201,7 @@ devread(char *iodest, int sector, int cnt) for (offset = 0; offset < cnt; offset += BPS) { dosdev_copy = dosdev; - p = Bread(dosdev_copy, badsect(dosdev_copy, sector++)); + p = Bread(dosdev_copy, badsect(sector++)); bcopy(p, iodest+offset, BPS); } } @@ -240,8 +241,8 @@ Bread(int dosdev, int sector) return (ra_buf + (sector - ra_first) * BPS); } -int -badsect(int dosdev, int sector) +static int +badsect(int sector) { #if defined(DO_BAD144) && !defined(RAWBOOT) int i; |