index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Dan McGee <dan@archlinux.org> | 2011-09-27 16:14:17 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-09-27 17:49:27 -0500 |
commit | bf56fb6eb82b732900c32cbf375f7910ac479d98 (patch) | |
tree | b370caa6f8f1c4f973358db0d22ca995d106ff37 /lib/libalpm/pkghash.c | |
parent | 619c3629ca61cea2c182fcb0197f9b84ba4209c3 (diff) |
-rw-r--r-- | lib/libalpm/pkghash.c | 8 |
diff --git a/lib/libalpm/pkghash.c b/lib/libalpm/pkghash.c index f6207ada..963ba25e 100644 --- a/lib/libalpm/pkghash.c +++ b/lib/libalpm/pkghash.c @@ -159,19 +159,19 @@ static alpm_pkghash_t *pkghash_add_pkg(alpm_pkghash_t *hash, alpm_pkg_t *pkg, in position = get_hash_position(pkg->name_hash, hash); - ptr = calloc(1, sizeof(alpm_list_t)); + ptr = malloc(sizeof(alpm_list_t)); if(ptr == NULL) { return hash; } ptr->data = pkg; - ptr->next = NULL; ptr->prev = ptr; + ptr->next = NULL; hash->hash_table[position] = ptr; - if(!sorted){ + if(!sorted) { hash->list = alpm_list_join(hash->list, ptr); - }else{ + } else { hash->list = alpm_list_mmerge(hash->list, ptr, _alpm_pkg_cmp); } |