diff options
author | Guillem Jover <guillem@debian.org> | 2010-07-11 19:00:56 +0200 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2010-07-16 17:16:38 +0200 |
commit | a9746761e3237e4cee5c5c7f5851b62b4de8ed37 (patch) | |
tree | 609f14f97f438a723775d32daba989c4c9869d1c /utils | |
parent | f530505861321e8d8a9e70cf5fd86278778b58d1 (diff) | |
download | dpkg-a9746761e3237e4cee5c5c7f5851b62b4de8ed37.tar.gz |
u-a: Rename variable index to idx to not shadow index(3)
Diffstat (limited to 'utils')
-rw-r--r-- | utils/update-alternatives.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/utils/update-alternatives.c b/utils/update-alternatives.c index 5c0c9397c..04c333d08 100644 --- a/utils/update-alternatives.c +++ b/utils/update-alternatives.c @@ -1409,7 +1409,7 @@ alternative_select_choice(struct alternative *a) { char *current, *ret, selection[_POSIX_PATH_MAX]; struct fileset *best, *fs; - int len, index; + int len, idx; current = alternative_get_current(a); best = alternative_get_best(a); @@ -1435,16 +1435,16 @@ alternative_select_choice(struct alternative *a) mark = " "; pr("%s %-12d %-*s % -10d %s", mark, 0, len, best->master_file, best->priority, _("auto mode")); - index = 1; + idx = 1; for (fs = a->choices; fs; fs = fs->next) { if (a->status == ALT_ST_MANUAL && current && strcmp(current, fs->master_file) == 0) mark = "*"; else mark = " "; - pr("%s %-12d %-*s % -10d %s", mark, index, len, + pr("%s %-12d %-*s % -10d %s", mark, idx, len, fs->master_file, fs->priority, _("manual mode")); - index++; + idx++; } printf("\n"); printf(_("Press enter to keep the current choice[*], " @@ -1457,16 +1457,16 @@ alternative_select_choice(struct alternative *a) selection[strlen(selection) - 1] = '\0'; if (strlen(selection) == 0) return current; - index = strtol(selection, &ret, 10); + idx = strtol(selection, &ret, 10); if (*ret == '\0') { /* Look up by index */ - if (index == 0) { + if (idx == 0) { alternative_set_status(a, ALT_ST_AUTO); free(current); return xstrdup(best->master_file); } - index--; - for (fs = a->choices; index && fs; index--) + idx--; + for (fs = a->choices; idx && fs; idx--) fs = fs->next; if (fs) { alternative_set_status(a, ALT_ST_MANUAL); |