From 31005731a814b8f174e0e99293d566b2e4f7482b Mon Sep 17 00:00:00 2001 From: Chantry Xavier Date: Thu, 9 Aug 2007 09:36:20 +0200 Subject: [PATCH] pacman/sync.c : return 0 on succesful search, 1 otherwise. Closes FS#7690. Signed-off-by: Chantry Xavier --- src/pacman/sync.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/src/pacman/sync.c b/src/pacman/sync.c index 800738d..b02ecde 100644 --- a/src/pacman/sync.c +++ b/src/pacman/sync.c @@ -228,6 +228,7 @@ static int sync_search(alpm_list_t *syncs, alpm_list_t *targets) { alpm_list_t *i, *j, *ret; int freelist; + int found = 0; for(i = syncs; i; i = alpm_list_next(i)) { pmdb_t *db = alpm_list_getdata(i); @@ -241,6 +242,8 @@ static int sync_search(alpm_list_t *syncs, alpm_list_t *targets) } if(ret == NULL) { continue; + } else { + found = 1; } for(j = ret; j; j = alpm_list_next(j)) { /* print repo/name (group) info about each package in our list */ @@ -275,7 +278,7 @@ static int sync_search(alpm_list_t *syncs, alpm_list_t *targets) } } - return(0); + return(!found); } static int sync_group(int level, alpm_list_t *syncs, alpm_list_t *targets) -- 1.5.2.4