summaryrefslogtreecommitdiff
path: root/lib/libalpm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/deps.c3
-rw-r--r--lib/libalpm/package.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/lib/libalpm/deps.c b/lib/libalpm/deps.c
index c3681b34..aef66d2d 100644
--- a/lib/libalpm/deps.c
+++ b/lib/libalpm/deps.c
@@ -373,8 +373,7 @@ int _alpm_depcmp(alpm_pkg_t *pkg, alpm_depend_t *dep)
int satisfy = 0;
/* check (pkg->name, pkg->version) */
- if(pkg->name_hash && dep->name_hash
- && pkg->name_hash != dep->name_hash) {
+ if(pkg->name_hash != dep->name_hash) {
/* skip more expensive checks */
} else {
satisfy = (strcmp(pkg->name, dep->name) == 0
diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c
index fd3d0c65..947f62e0 100644
--- a/lib/libalpm/package.c
+++ b/lib/libalpm/package.c
@@ -625,8 +625,7 @@ alpm_pkg_t *_alpm_pkg_find(alpm_list_t *haystack, const char *needle)
alpm_pkg_t *info = lp->data;
if(info) {
- /* a zero hash will cause a fall-through just in case */
- if(info->name_hash && info->name_hash != needle_hash) {
+ if(info->name_hash != needle_hash) {
continue;
}