summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/add.c
diff options
context:
space:
mode:
authorChantry Xavier <shiningxc@gmail.com>2007-12-02 23:48:12 +0100
committerDan McGee <dan@archlinux.org>2007-12-03 01:12:41 +0100
commit594f1fbbb1c6aa64368c01d92ab5d7533e4e9cfa (patch)
tree7a85f7815e6b41b395bc58ccfedac0316b1e677f /lib/libalpm/add.c
parent94aa8b1f163c88cb47c049da4f3c9935dc6da1e8 (diff)
downloadpacman-594f1fbbb1c6aa64368c01d92ab5d7533e4e9cfa.tar.gz
pacman-594f1fbbb1c6aa64368c01d92ab5d7533e4e9cfa.tar.xz
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 <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/add.c')
-rw-r--r--lib/libalpm/add.c4
1 files changed, 3 insertions, 1 deletions
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) {