summaryrefslogtreecommitdiffstats
path: root/sys/i386/boot/biosboot/disk.c
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1996-10-08 22:25:22 +0000
committerbde <bde@FreeBSD.org>1996-10-08 22:25:22 +0000
commit11c65a934bc02357fb7696a9427a18d63f8675a0 (patch)
tree3f2ce26e82137c31ea629c28aee5f3c98be1989f /sys/i386/boot/biosboot/disk.c
parent34f60067c2b35f8be72cab3d64facb3a74e868b5 (diff)
downloadFreeBSD-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/disk.c')
-rw-r--r--sys/i386/boot/biosboot/disk.c11
1 files changed, 6 insertions, 5 deletions
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;
OpenPOWER on IntegriCloud