diff options
author | 2007-08-05 03:24:58 +0000 | |
---|---|---|
committer | 2007-08-05 03:24:58 +0000 | |
commit | f9a0ad2ea62f2703fe2fa1c30d261464da56e8df (patch) | |
tree | 0ffa81e4fbe1f6d103bf6ed0ac759b24e268ee03 /sys/kern/subr_disk.c | |
parent | sync (diff) | |
download | wireguard-openbsd-f9a0ad2ea62f2703fe2fa1c30d261464da56e8df.tar.xz wireguard-openbsd-f9a0ad2ea62f2703fe2fa1c30d261464da56e8df.zip |
Use d_partitions[DISKPART(dev)] rather that d_partitions +
DISKPART(dev). Thus making the idiom the same everywhere.
pointed out by deraadt@
Diffstat (limited to 'sys/kern/subr_disk.c')
-rw-r--r-- | sys/kern/subr_disk.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/subr_disk.c b/sys/kern/subr_disk.c index e8bf114dd88..294a7d4c285 100644 --- a/sys/kern/subr_disk.c +++ b/sys/kern/subr_disk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_disk.c,v 1.62 2007/06/25 16:11:42 otto Exp $ */ +/* $OpenBSD: subr_disk.c,v 1.63 2007/08/05 03:24:58 krw Exp $ */ /* $NetBSD: subr_disk.c,v 1.17 1996/03/16 23:17:08 christos Exp $ */ /* @@ -605,7 +605,7 @@ int bounds_check_with_label(struct buf *bp, struct disklabel *lp, int wlabel) { #define blockpersec(count, lp) ((count) * (((lp)->d_secsize) / DEV_BSIZE)) - struct partition *p = lp->d_partitions + DISKPART(bp->b_dev); + struct partition *p = &lp->d_partitions[DISKPART(bp->b_dev)]; daddr64_t sz = howmany(bp->b_bcount, DEV_BSIZE); /* avoid division by zero */ |