From 594f1fbbb1c6aa64368c01d92ab5d7533e4e9cfa Mon Sep 17 00:00:00 2001 From: Chantry Xavier Date: Sun, 2 Dec 2007 23:48:12 +0100 Subject: alpm_list : change the alpm_list_find* to return the matching item. alpm_list_find and alpm_list_find_ptr will now return a void *, and alpm_list_find_str will return a char *, instead of an int. Signed-off-by: Chantry Xavier Signed-off-by: Dan McGee --- lib/libalpm/add.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/libalpm/add.c') diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c index 3a573ddd..24f2b51f 100644 --- a/lib/libalpm/add.c +++ b/lib/libalpm/add.c @@ -412,7 +412,9 @@ static int extract_single_file(struct archive *archive, } else { /* go to the backup array and see if our conflict is there */ /* check newpkg first, so that adding backup files is retroactive */ - needbackup = alpm_list_find_str(alpm_pkg_get_backup(newpkg), entryname); + if(alpm_list_find_str(alpm_pkg_get_backup(newpkg), entryname) != NULL) { + needbackup = 1; + } /* check oldpkg for a backup entry, store the hash if available */ if(oldpkg) { -- cgit v1.2.3-54-g00ecf