diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2007-08-05 03:24:59 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2007-08-05 03:24:59 +0000 |
commit | f9e604faa5607f7faf5cdb562e6977e23a94342c (patch) | |
tree | 943dda7f2f67ef1571b52c078e767c018c7d4798 /sys/kern | |
parent | 6fdba12b84c685b42e90cbe401f3f6e6e49ab9ed (diff) |
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')
-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 */ |