summaryrefslogtreecommitdiff
path: root/lib/libalpm/package.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/package.c')
-rw-r--r--lib/libalpm/package.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c
index d5738703..09161dba 100644
--- a/lib/libalpm/package.c
+++ b/lib/libalpm/package.c
@@ -467,8 +467,8 @@ pmpkg_t *_alpm_pkg_isin(char *needle, alpm_list_t *haystack)
for(lp = haystack; lp; lp = lp->next) {
pmpkg_t *info = lp->data;
- if(info && !strcmp(info->name, needle)) {
- return(lp->data);
+ if(info && strcmp(info->name, needle) == 0) {
+ return(info);
}
}
return(NULL);