diff options
author | dillon <dillon@FreeBSD.org> | 1999-01-28 01:59:53 +0000 |
---|---|---|
committer | dillon <dillon@FreeBSD.org> | 1999-01-28 01:59:53 +0000 |
commit | 9328688fc8b9743439e9dbe6f6364cb0317e387f (patch) | |
tree | 4f99904371de94ee7846eb8f747ab1e5a1fa463b /sys/kern/subr_diskmbr.c | |
parent | c970e06ccf646c8d420b2216f605eefeef3cdc0d (diff) | |
download | FreeBSD-src-9328688fc8b9743439e9dbe6f6364cb0317e387f.zip FreeBSD-src-9328688fc8b9743439e9dbe6f6364cb0317e387f.tar.gz |
Fix warnings in preparation for adding -Wall -Wcast-qual to the
kernel compile
Diffstat (limited to 'sys/kern/subr_diskmbr.c')
-rw-r--r-- | sys/kern/subr_diskmbr.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/kern/subr_diskmbr.c b/sys/kern/subr_diskmbr.c index adfd39c..752ec10 100644 --- a/sys/kern/subr_diskmbr.c +++ b/sys/kern/subr_diskmbr.c @@ -35,7 +35,7 @@ * * from: @(#)ufs_disksubr.c 7.16 (Berkeley) 5/4/91 * from: ufs_disksubr.c,v 1.8 1994/06/07 01:21:39 phk Exp $ - * $Id: diskslice_machdep.c,v 1.31 1998/08/10 07:22:14 phk Exp $ + * $Id: diskslice_machdep.c,v 1.32 1998/12/04 22:54:46 archie Exp $ */ #include <sys/param.h> @@ -103,11 +103,11 @@ check_part(sname, dp, offset, nsectors, ntracks, mbr_offset ) * apart from the cylinder being reduced modulo 1024. Always allow * 1023/255/63. */ - if (ssector < ssector1 + if ((ssector < ssector1 && ((chs_ssect == nsectors && dp->dp_shd == ntracks - 1 && chs_scyl == 1023) || (secpercyl != 0 - && (ssector1 - ssector) % (1024 * secpercyl) == 0)) + && (ssector1 - ssector) % (1024 * secpercyl) == 0))) || (dp->dp_scyl == 255 && dp->dp_shd == 255 && dp->dp_ssect == 255)) { TRACE(("%s: C/H/S start %d/%d/%d, start %lu: allow\n", @@ -122,11 +122,11 @@ check_part(sname, dp, offset, nsectors, ntracks, mbr_offset ) esector1 = ssector1 + dp->dp_size - 1; /* Allow certain bogus C/H/S values for esector, as above. */ - if (esector < esector1 + if ((esector < esector1 && ((chs_esect == nsectors && dp->dp_ehd == ntracks - 1 && chs_ecyl == 1023) || (secpercyl != 0 - && (esector1 - esector) % (1024 * secpercyl) == 0)) + && (esector1 - esector) % (1024 * secpercyl) == 0))) || (dp->dp_ecyl == 255 && dp->dp_ehd == 255 && dp->dp_esect == 255)) { TRACE(("%s: C/H/S end %d/%d/%d, end %lu: allow\n", |