From e56980597b90b5107f577c25b25c1a0818d61d7a Mon Sep 17 00:00:00 2001 From: Aurelien Foret Date: Sat, 23 Apr 2005 17:16:50 +0000 Subject: code cleanup --- src/pacman/sync.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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)); + } } } } -- cgit v1.2.3-70-g09d2