index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Aurelien Foret <aurelien@archlinux.org> | 2006-01-06 14:00:03 +0000 |
---|---|---|
committer | Aurelien Foret <aurelien@archlinux.org> | 2006-01-06 14:00:03 +0000 |
commit | 2c22045ba85778dcdcedeee9ab11b8631c007cc5 (patch) | |
tree | 6d6fb84345f23686b826cba8031e46f475325deb /lib | |
parent | 4585060a5a47e77ffb4bffef110b16505921a75d (diff) |
-rw-r--r-- | lib/libalpm/alpm.c | 9 | ||||
-rw-r--r-- | lib/libalpm/alpm.h | 1 |
diff --git a/lib/libalpm/alpm.c b/lib/libalpm/alpm.c index 833737f4..7dca7ffd 100644 --- a/lib/libalpm/alpm.c +++ b/lib/libalpm/alpm.c @@ -719,8 +719,6 @@ int alpm_logaction(char *fmt, ...) PMList *alpm_list_first(PMList *list) { - ASSERT(list != NULL, return(NULL)); - return(list); } @@ -740,10 +738,17 @@ void *alpm_list_getdata(PMList *entry) int alpm_list_free(PMList *entry) { + ASSERT(entry != NULL, return(-1)); + FREELIST(entry); return(0); } + +int alpm_list_count(PMList *list) +{ + return(_alpm_list_count(list)); +} /** @} */ /** @defgroup alpm_misc Miscellaneous Functions diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index 454fdc09..09034067 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -300,6 +300,7 @@ PM_LIST *alpm_list_first(PM_LIST *list); PM_LIST *alpm_list_next(PM_LIST *entry); void *alpm_list_getdata(PM_LIST *entry); int alpm_list_free(PM_LIST *entry); +int alpm_list_count(PM_LIST *list); /* md5sums */ char *alpm_get_md5sum(char *name); |