diff options
author | 2015-09-11 12:40:05 +0000 | |
---|---|---|
committer | 2015-09-11 12:40:05 +0000 | |
commit | 03d3bff9b4c5df4e71e7b231b8dd453cc8bd1ef2 (patch) | |
tree | 0027eff39cdb4a7f42740ad3d11b39d3f41cd6fe | |
parent | _rpc_dtablesize() is not used anywhere, tracking by sthen; ok guenther (diff) | |
download | wireguard-openbsd-03d3bff9b4c5df4e71e7b231b8dd453cc8bd1ef2.tar.xz wireguard-openbsd-03d3bff9b4c5df4e71e7b231b8dd453cc8bd1ef2.zip |
KNF shuffling of local declarations in readgptlabel().
-rw-r--r-- | sys/kern/subr_disk.c | 15 |
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); |