summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-08-12 02:26:20 +0200
committerDan McGee <dan@archlinux.org>2011-08-12 03:17:21 +0200
commitc9cc2332cfe59f69ab28b3b928794aa5d24342bc (patch)
treeb5978288d768d1b7b4c6da584022b67b6e8b2c5f /src
parent450bcb5d7bbab1c228f02e8010029fed5f751173 (diff)
downloadpacman-c9cc2332cfe59f69ab28b3b928794aa5d24342bc.tar.gz
pacman-c9cc2332cfe59f69ab28b3b928794aa5d24342bc.tar.xz
pacman/query.c: avoid variable redeclaration
We were using i as the loop variable in both the inner and outer loop. Use j in the inner loop instead for clarity. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src')
-rw-r--r--src/pacman/query.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pacman/query.c b/src/pacman/query.c
index 163c3319..2fb985a3 100644
--- a/src/pacman/query.c
+++ b/src/pacman/query.c
@@ -193,10 +193,10 @@ static int query_fileowner(alpm_list_t *targets)
for(i = alpm_db_get_pkgcache(db_local); i && !found; i = alpm_list_next(i)) {
alpm_pkg_t *info = alpm_list_getdata(i);
alpm_filelist_t *filelist = alpm_pkg_get_files(info);
- size_t i;
+ size_t j;
- for(i = 0; i < filelist->count; i++) {
- const alpm_file_t *file = filelist->files + i;
+ for(j = 0; j < filelist->count; j++) {
+ const alpm_file_t *file = filelist->files + j;
char *ppath, *pdname;
const char *pkgfile = file->name;