From 59c47aaf529df02ec1577fe727c3c84d13592666 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Sat, 19 Jun 2010 18:55:08 +1000 Subject: Clarify testing within conditional statements Follow the HACKING guidelines and always use != 0 or == 0 rather than negation within conditional statements to improve clarity. Most of these are !strcmp usages which is the example of what not to do in the HACKING document. Signed-off-by: Allan McRae --- lib/libalpm/deps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/libalpm/deps.c') diff --git a/lib/libalpm/deps.c b/lib/libalpm/deps.c index 26f9b16d..fd893a63 100644 --- a/lib/libalpm/deps.c +++ b/lib/libalpm/deps.c @@ -546,7 +546,7 @@ pmpkg_t *_alpm_resolvedep(pmdepend_t *dep, alpm_list_t *dbs, for(i = dbs; i; i = i->next) { for(j = _alpm_db_get_pkgcache(i->data); j; j = j->next) { pmpkg_t *pkg = j->data; - if(alpm_depcmp(pkg, dep) && strcmp(pkg->name, dep->name) && + if(alpm_depcmp(pkg, dep) && strcmp(pkg->name, dep->name) != 0 && !_alpm_pkg_find(excluding, pkg->name)) { if(_alpm_pkg_should_ignore(pkg)) { int install = 0; -- cgit v1.2.3-24-g4f1b