diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2002-03-24 22:51:55 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2002-03-24 22:51:55 +0000 |
commit | b53f7fdd95c26e7e70b5e8451f520fcecf977f1b (patch) | |
tree | f4a7924ede7b78b7a88085280e1cc1c2a07c676e /sbin | |
parent | 9b428a114b6da99b75e4fd912f83566a7b06e571 (diff) |
Work around a compiler bug on sparc64; deraadt@ OK
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/disklabel/disklabel.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sbin/disklabel/disklabel.c b/sbin/disklabel/disklabel.c index bfaa8811cda..a914304e1fc 100644 --- a/sbin/disklabel/disklabel.c +++ b/sbin/disklabel/disklabel.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disklabel.c,v 1.72 2002/02/16 21:27:33 millert Exp $ */ +/* $OpenBSD: disklabel.c,v 1.73 2002/03/24 22:51:54 millert Exp $ */ /* * Copyright (c) 1987, 1993 @@ -43,7 +43,7 @@ static const char copyright[] = #endif /* not lint */ #ifndef lint -static const char rcsid[] = "$OpenBSD: disklabel.c,v 1.72 2002/02/16 21:27:33 millert Exp $"; +static const char rcsid[] = "$OpenBSD: disklabel.c,v 1.73 2002/03/24 22:51:54 millert Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -1009,6 +1009,8 @@ display_partition(f, lp, mp, i, unit, width) if (width == 0) width = 8; unit = toupper(unit); + p_size = -1.0; /* no conversion by default */ + p_offset = 0.0; switch (unit) { case 'B': p_size = (double)pp->p_size * lp->d_secsize; @@ -1034,11 +1036,6 @@ display_partition(f, lp, mp, i, unit, width) p_size = (double)pp->p_size / ((1024*1024*1024) / lp->d_secsize); p_offset = (double)pp->p_offset / ((1024*1024*1024) / lp->d_secsize); break; - - default: - p_size = -1; /* no conversion */ - p_offset = 0; - break; } if (pp->p_size) { |