summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAurelien Foret <aurelien@archlinux.org>2005-04-23 17:16:50 +0000
committerAurelien Foret <aurelien@archlinux.org>2005-04-23 17:16:50 +0000
commite56980597b90b5107f577c25b25c1a0818d61d7a (patch)
treea757e8cd287dde75f49023fddc49f6e98b269d3d /src
parent6511f1949e1429677ed423c2c79cf5924d5e1093 (diff)
downloadpacman-e56980597b90b5107f577c25b25c1a0818d61d7a.tar.xz
code cleanup
Diffstat (limited to 'src')
-rw-r--r--src/pacman/sync.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/pacman/sync.c b/src/pacman/sync.c
index 76183bf5..a29e0779 100644
--- a/src/pacman/sync.c
+++ b/src/pacman/sync.c
@@ -529,7 +529,10 @@ int pacman_sync(list_t *targets)
data = alpm_sync_getinfo(sync, PM_SYNC_DATA);
for(j = alpm_list_first(data); j; j = alpm_list_next(j)) {
PM_PKG *p = alpm_list_getdata(j);
- list = list_add(list, strdup((char *)alpm_pkg_getinfo(p, PM_PKG_NAME)));
+ char *pkgname = alpm_pkg_getinfo(p, PM_PKG_NAME);
+ if(!list_is_strin(pkgname, list)) {
+ list = list_add(list, strdup(pkgname));
+ }
}
}
}