From 24324ff0e12a3e19cada669a4c5c391e486790a3 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Mon, 4 Jul 2011 11:17:12 +1000 Subject: Simplify alpm_list_previous We can readily detect the first node in a list by checking if node->prev->next is NULL. So there is no need to pass the head of the list to this function and its prototype now looks like all the other item accessors. Signed-off-by: Allan McRae Signed-off-by: Dan McGee --- lib/libalpm/alpm_list.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/libalpm/alpm_list.h') diff --git a/lib/libalpm/alpm_list.h b/lib/libalpm/alpm_list.h index 824e8660..5e8ca460 100644 --- a/lib/libalpm/alpm_list.h +++ b/lib/libalpm/alpm_list.h @@ -69,7 +69,7 @@ alpm_list_t *alpm_list_reverse(alpm_list_t *list); /* item accessors */ 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); +alpm_list_t *alpm_list_previous(const alpm_list_t *list); alpm_list_t *alpm_list_last(const alpm_list_t *list); void *alpm_list_getdata(const alpm_list_t *entry); -- cgit v1.2.3-24-g4f1b