Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/conflict.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/conflict.c')
-rw-r--r--lib/libalpm/conflict.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/libalpm/conflict.c b/lib/libalpm/conflict.c
index e36844a8..2b0efa5a 100644
--- a/lib/libalpm/conflict.c
+++ b/lib/libalpm/conflict.c
@@ -38,7 +38,6 @@
#include "trans.h"
#include "util.h"
#include "log.h"
-#include "cache.h"
#include "deps.h"
pmconflict_t *_alpm_conflict_new(const char *package1, const char *package2, const char *reason)
@@ -88,8 +87,8 @@ int _alpm_conflict_isin(pmconflict_t *needle, alpm_list_t *haystack)
char *cpkg2 = conflict->package2;
char *npkg1 = needle->package1;
char *npkg2 = needle->package2;
- if((!strcmp(cpkg1, npkg1) && !strcmp(cpkg2, npkg2))
- || (!strcmp(cpkg1, npkg2) && !strcmp(cpkg2, npkg1))) {
+ if((strcmp(cpkg1, npkg1) == 0 && strcmp(cpkg2, npkg2) == 0)
+ || (strcmp(cpkg1, npkg2) == 0 && strcmp(cpkg2, npkg1) == 0)) {
return(1);
}
}
@@ -110,7 +109,7 @@ static int does_conflict(pmpkg_t *pkg1, const char *conflict, pmpkg_t *pkg2)
pmdepend_t *conf = _alpm_splitdep(conflict);
int match = 0;
- match = alpm_depcmp(pkg2, conf);
+ match = _alpm_depcmp(pkg2, conf);
if(match) {
_alpm_log(PM_LOG_DEBUG, "package %s conflicts with %s (by %s)\n",
pkg1name, pkg2name, conflict);
@@ -321,7 +320,7 @@ static alpm_list_t *chk_filedifference(alpm_list_t *filesA, alpm_list_t *filesB)
*/
static alpm_list_t *add_fileconflict(alpm_list_t *conflicts,
pmfileconflicttype_t type, const char *filestr,
- const char* name1, const char* name2)
+ const char* name1, const char* name2)
{
pmfileconflict_t *conflict;
MALLOC(conflict, sizeof(pmfileconflict_t), RET_ERR(PM_ERR_MEMORY, NULL));