summaryrefslogtreecommitdiff
path: root/lib/libalpm/package.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-08-08 23:57:19 -0500
committerDan McGee <dan@archlinux.org>2011-08-09 15:38:54 -0500
commit40ea6cd607d5edb2699c084259b237d435313670 (patch)
tree65ad9091896b4603d5008a38e68518b3bcfe87ef /lib/libalpm/package.c
parent9d3d647f0031edd31fc7442f9d2cd9729718e41c (diff)
downloadpacman-40ea6cd607d5edb2699c084259b237d435313670.tar.xz
Depend on name_hash being set
This is a fairly valid assumption at this point, or at least as good of one as assuming packages all have names. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/package.c')
-rw-r--r--lib/libalpm/package.c3
1 files changed, 1 insertions, 2 deletions
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;
}