summaryrefslogtreecommitdiffstats
path: root/sbin/disklabel/editor.c
diff options
context:
space:
mode:
authorcnst <cnst@openbsd.org>2008-12-07 18:31:29 +0000
committercnst <cnst@openbsd.org>2008-12-07 18:31:29 +0000
commitb3ae22dde164ef00840d47bac67e5d654374caf6 (patch)
treea96b44808eb55db4e90667c5a1b5814957e99ea6 /sbin/disklabel/editor.c
parentWhen resampling, don't require the sample frequency to be an integer. (diff)
downloadwireguard-openbsd-b3ae22dde164ef00840d47bac67e5d654374caf6.tar.xz
wireguard-openbsd-b3ae22dde164ef00840d47bac67e5d654374caf6.zip
clean up find_bounds(), no binary change; 'dead initialisation' llvm/clang; ok krw millert
Diffstat (limited to 'sbin/disklabel/editor.c')
-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);