From c9cc2332cfe59f69ab28b3b928794aa5d24342bc Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Thu, 11 Aug 2011 19:26:20 -0500 Subject: 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 --- src/pacman/query.c | 6 +++--- 1 file 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; -- cgit v1.2.3-24-g4f1b