[syslinux:elflink] com32/chain: remove redundant rawindex

syslinux-bot for Michal Soltys soltys at ziu.info
Sat Feb 16 01:48:09 PST 2013


Commit-ID:  e807b5167d65b5c76acd4f3073832405d01fda31
Gitweb:     http://www.syslinux.org/commit/e807b5167d65b5c76acd4f3073832405d01fda31
Author:     Michal Soltys <soltys at ziu.info>
AuthorDate: Thu, 14 Feb 2013 16:51:45 +0100
Committer:  Michal Soltys <soltys at ziu.info>
CommitDate: Thu, 14 Feb 2013 16:53:04 +0100

com32/chain: remove redundant rawindex

'index0' provides the same "raw" info, complementing standard 'index'.

Signed-off-by: Michal Soltys <soltys at ziu.info>

---
 com32/chain/mangle.c   | 4 ++--
 com32/chain/partiter.c | 2 --
 com32/chain/partiter.h | 5 ++---
 3 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/com32/chain/mangle.c b/com32/chain/mangle.c
index 7fe77ee..136f3bc 100644
--- a/com32/chain/mangle.c
+++ b/com32/chain/mangle.c
@@ -544,7 +544,7 @@ int manglepe_hide(struct part_iter *miter)
 	return -1;
 
     while (!pi_next(iter) && !werr) {
-	ridx = iter->rawindex;
+	ridx = iter->index0 + 1;
 	if (!(opt.hide & 2) && ridx > 4)
 	    break;  /* skip when we're constrained to pri only */
 
@@ -614,7 +614,7 @@ int manglepe_fixchs(struct part_iter *miter)
 	return -1;
 
     while (!pi_next(iter) && !werr) {
-	ridx = iter->rawindex;
+	ridx = iter->index0 + 1;
 	dp = (struct disk_dos_part_entry *)iter->record;
 
 	wb |= mpe_setchs(&iter->di, dp, iter->start_lba);
diff --git a/com32/chain/partiter.c b/com32/chain/partiter.c
index 23cbf90..25810eb 100644
--- a/com32/chain/partiter.c
+++ b/com32/chain/partiter.c
@@ -462,7 +462,6 @@ static int pi_dos_next(struct part_iter *iter)
 	iter->index = -1;
     else
 	iter->index = iter->index0 - iter->dos.skipcnt + 1;
-    iter->rawindex = iter->index0 + 1;
     iter->start_lba = start_lba;
     iter->length = dos_part->length;
     iter->record = (char *)dos_part;
@@ -500,7 +499,6 @@ static int pi_gpt_next(struct part_iter *iter)
     }
     /* gpt_part is guaranteed to be valid here */
     iter->index = iter->index0 + 1;
-    iter->rawindex = iter->index0 + 1;
     iter->start_lba = gpt_part->lba_first;
     iter->length = gpt_part->lba_last - gpt_part->lba_first + 1;
     iter->record = (char *)gpt_part;
diff --git a/com32/chain/partiter.h b/com32/chain/partiter.h
index 821d448..10f1882 100644
--- a/com32/chain/partiter.h
+++ b/com32/chain/partiter.h
@@ -65,9 +65,8 @@ struct part_iter {
     uint64_t start_lba;
     uint64_t length;
     int index0;	    /* including holes, from -1 (disk, then parts from 0) */
-    int rawindex;   /* including holes, from  0 (disk, then parts from 1) */
-    int index;	    /* excluding holes, from  0 (disk) (-1) means hole, if PIF_STEPALL is set */
-    int flags;      /* flags, see #defines above */
+    int index;	    /* excluding holes, from  0 (disk, then parts from 1), -1 means hole, if PIF_STEPALL is set */
+    int flags;	    /* flags, see #defines above */
     int status;	    /* current status, see enums above */
     struct disk_info di;
     union {


More information about the Syslinux-commits mailing list