summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorConstantine A. Murenin <cnst@cvs.openbsd.org>2008-12-07 18:31:30 +0000
committerConstantine A. Murenin <cnst@cvs.openbsd.org>2008-12-07 18:31:30 +0000
commitb3fc9268876dd2cdd136d17165de0aca54431366 (patch)
tree5ba2f91c11a71df64a3a11f5f13a4ee34186fb88 /sbin
parent14c3f6f95a831612faa3e56bfbcad1ee0ed463a0 (diff)
clean up find_bounds(), no binary change; 'dead initialisation' llvm/clang; ok krw millert
Diffstat (limited to 'sbin')
-rw-r--r--sbin/disklabel/editor.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/sbin/disklabel/editor.c b/sbin/disklabel/editor.c
index 08901c4c922..606222b7f87 100644
--- a/sbin/disklabel/editor.c
+++ b/sbin/disklabel/editor.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: editor.c,v 1.172 2008/12/07 01:11:50 cnst Exp $ */
+/* $OpenBSD: editor.c,v 1.173 2008/12/07 18:31:29 cnst Exp $ */
/*
* Copyright (c) 1997-2000 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -17,7 +17,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: editor.c,v 1.172 2008/12/07 01:11:50 cnst Exp $";
+static char rcsid[] = "$OpenBSD: editor.c,v 1.173 2008/12/07 18:31:29 cnst Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -1344,11 +1344,6 @@ free_chunks(struct disklabel *lp)
void
find_bounds(struct disklabel *lp)
{
-#ifdef DOSLABEL
- struct partition *pp = &lp->d_partitions[RAW_PART];
- u_int64_t new_end;
- int i;
-#endif
/* Defaults */
/* XXX - reserve a cylinder for hp300? */
starting_sector = 0;
@@ -1359,7 +1354,11 @@ find_bounds(struct disklabel *lp)
* If we have an MBR, use values from the OpenBSD partition.
*/
if (dosdp) {
- if (dosdp->dp_typ == DOSPTYP_OPENBSD) {
+ if (dosdp->dp_typ == DOSPTYP_OPENBSD) {
+ struct partition *pp;
+ u_int64_t new_end;
+ int i;
+
/* Set start and end based on fdisk partition bounds */
starting_sector = letoh32(dosdp->dp_start);
ending_sector = starting_sector + letoh32(dosdp->dp_size);