summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2015-09-11 12:40:06 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2015-09-11 12:40:06 +0000
commitc8456930bbde0a6b1b963eb914e4bd434452faf3 (patch)
treef031998123f97eb20a75144e0bc6263c9689356d /sys/kern
parent8097b54fbfe4f30f8748de6a5741927ad0be2234 (diff)
KNF shuffling of local declarations in readgptlabel().
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/subr_disk.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/sys/kern/subr_disk.c b/sys/kern/subr_disk.c
index 361f886c94f..35114eb1e19 100644
--- a/sys/kern/subr_disk.c
+++ b/sys/kern/subr_disk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr_disk.c,v 1.208 2015/09/11 11:04:40 krw Exp $ */
+/* $OpenBSD: subr_disk.c,v 1.209 2015/09/11 12:40:05 krw Exp $ */
/* $NetBSD: subr_disk.c,v 1.17 1996/03/16 23:17:08 christos Exp $ */
/*
@@ -686,17 +686,14 @@ int
readgptlabel(struct buf *bp, void (*strat)(struct buf *),
struct disklabel *lp, daddr_t *partoffp, int spoofonly)
{
+ static const u_int8_t gpt_uuid_openbsd[] = GPT_UUID_OPENBSD;
struct gpt_header gh;
- struct gpt_partition *gp, *gp_tmp;
- size_t gpsz;
struct uuid uuid_part, uuid_openbsd;
+ struct gpt_partition *gp, *gp_tmp;
struct partition *pp;
-
- u_int64_t sector;
- u_int64_t gptpartoff = 0, gptpartend = DL_GETBEND(lp);
- int i, altheader = 0, error, n=0, ourpart = -1, offset;
-
- static const u_int8_t gpt_uuid_openbsd[] = GPT_UUID_OPENBSD;
+ size_t gpsz;
+ u_int64_t gptpartoff = 0, gptpartend = DL_GETBEND(lp), sector;
+ int i, altheader = 0, error, n = 0, ourpart = -1, offset;
uuid_dec_be(gpt_uuid_openbsd, &uuid_openbsd);