diff options
author | Russ Cox <rsc@swtch.com> | 2008-06-04 20:59:28 -0400 |
---|---|---|
committer | Russ Cox <rsc@swtch.com> | 2008-06-04 20:59:28 -0400 |
commit | 25745eb3b1457732ba926d739fdca9f3b223dbfb (patch) | |
tree | 967418426baa645862f68671f2d11f037244e66b /src | |
parent | cf69e5d420c7f91f80c56f3b3a56f14471e80f0e (diff) | |
download | plan9port-25745eb3b1457732ba926d739fdca9f3b223dbfb.tar.gz plan9port-25745eb3b1457732ba926d739fdca9f3b223dbfb.tar.bz2 plan9port-25745eb3b1457732ba926d739fdca9f3b223dbfb.zip |
libdisk: avoid unreachable code to silence Sun cc warning (Russell Davies)
Diffstat (limited to 'src')
-rw-r--r-- | src/libdisk/disk.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/src/libdisk/disk.c b/src/libdisk/disk.c index a39276f4..3428c467 100644 --- a/src/libdisk/disk.c +++ b/src/libdisk/disk.c @@ -143,23 +143,21 @@ drivergeometry(Disk *disk) disk->h = 255; disk->c /= 17; return 0; + } - default: - for(m = 2; m*disk->h < 256; m *= 2) { - if(disk->c/m < 1024) { - disk->c /= m; - disk->h *= m; - return 0; - } + for(m = 2; m*disk->h < 256; m *= 2) { + if(disk->c/m < 1024) { + disk->c /= m; + disk->h *= m; + return 0; } - - /* set to 255, 63 and be done with it */ - disk->h = 255; - disk->s = 63; - disk->c = disk->secs / (disk->h * disk->s); - return 0; } - return -1; /* not reached */ + + /* set to 255, 63 and be done with it */ + disk->h = 255; + disk->s = 63; + disk->c = disk->secs / (disk->h * disk->s); + return 0; } /* |