From 4c6abb7bc0e382a4196ec4b0e38dff800b1631df Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Thu, 14 Jun 2007 03:29:35 +0000 Subject: do not depend on previous loop variable, use a constant instead --- sys/arch/landisk/landisk/disksubr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sys/arch/landisk') diff --git a/sys/arch/landisk/landisk/disksubr.c b/sys/arch/landisk/landisk/disksubr.c index d8730a8118b..1dcbdcca7ec 100644 --- a/sys/arch/landisk/landisk/disksubr.c +++ b/sys/arch/landisk/landisk/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.29 2007/06/12 20:57:42 deraadt Exp $ */ +/* $OpenBSD: disksubr.c,v 1.30 2007/06/14 03:29:34 deraadt Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -88,9 +88,9 @@ readdisklabel(dev_t dev, void (*strat)(struct buf *), DL_SETPSIZE(&lp->d_partitions[i], 0); DL_SETPOFFSET(&lp->d_partitions[i], 0); } - if (DL_GETPSIZE(&lp->d_partitions[i]) == 0) - DL_SETPSIZE(&lp->d_partitions[i], DL_GETDSIZE(lp)); - DL_SETPOFFSET(&lp->d_partitions[i], 0); + if (DL_GETPSIZE(&lp->d_partitions[RAW_PART]) == 0) + DL_SETPSIZE(&lp->d_partitions[RAW_PART], DL_GETDSIZE(lp)); + DL_SETPOFFSET(&lp->d_partitions[RAW_PART], 0); /* get a buffer and initialize it */ bp = geteblk((int)lp->d_secsize); -- cgit v1.2.3