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>
This commit is contained in:
parent
9d3d647f00
commit
40ea6cd607
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue