summaryrefslogtreecommitdiff
path: root/lib/libalpm
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2011-07-04 08:38:09 +1000
committerDan McGee <dan@archlinux.org>2011-07-05 10:22:05 -0500
commit97103f860d48e1f6f9c0dd7c75568618f8ed5163 (patch)
treee1f79f41530c121ae4ee9d49bad379c2008ee2bd /lib/libalpm
parentc748eadc80593c3941b55b1d4ec6e46899abd295 (diff)
Remove alpm_list_first
The only thing this accessor did was remove the const qualifier given our entire list implementation requires passing around the head anyway. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/alpm_list.c16
-rw-r--r--lib/libalpm/alpm_list.h1
2 files changed, 0 insertions, 17 deletions
diff --git a/lib/libalpm/alpm_list.c b/lib/libalpm/alpm_list.c
index 1976e13d..38cefa62 100644
--- a/lib/libalpm/alpm_list.c
+++ b/lib/libalpm/alpm_list.c
@@ -507,22 +507,6 @@ alpm_list_t SYMEXPORT *alpm_list_reverse(alpm_list_t *list)
/* Accessors */
/**
- * @brief Get the first element of a list.
- *
- * @param list the list
- *
- * @return the first element in the list
- */
-inline alpm_list_t SYMEXPORT *alpm_list_first(const alpm_list_t *list)
-{
- if(list) {
- return (alpm_list_t *)list;
- } else {
- return NULL;
- }
-}
-
-/**
* @brief Return nth element from list (starting from 0).
*
* @param list the list
diff --git a/lib/libalpm/alpm_list.h b/lib/libalpm/alpm_list.h
index 27a76d12..824e8660 100644
--- a/lib/libalpm/alpm_list.h
+++ b/lib/libalpm/alpm_list.h
@@ -67,7 +67,6 @@ alpm_list_t *alpm_list_copy_data(const alpm_list_t *list, size_t size);
alpm_list_t *alpm_list_reverse(alpm_list_t *list);
/* item accessors */
-alpm_list_t *alpm_list_first(const alpm_list_t *list);
alpm_list_t *alpm_list_nth(const alpm_list_t *list, size_t n);
alpm_list_t *alpm_list_next(const alpm_list_t *list);
alpm_list_t *alpm_list_previous(const alpm_list_t *list, const alpm_list_t *node);