From 6be492d2f71bf0968b836e17a0f59a0e32572b49 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Thu, 6 Oct 2011 00:55:47 -0500 Subject: Remove alpm_list_getdata wrapper function This one is pretty darn useless. Just derefence the ->data attribute since the type is public anyway and save yourself the function call. Signed-off-by: Dan McGee --- src/pacman/pacman.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/pacman/pacman.c') diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c index 326664dd..d14b8879 100644 --- a/src/pacman/pacman.c +++ b/src/pacman/pacman.c @@ -211,7 +211,7 @@ static void usage(int op, const char * const myname) } list = alpm_list_msort(list, alpm_list_count(list), options_cmp); for (i = list; i; i = alpm_list_next(i)) { - printf("%s", (char *)alpm_list_getdata(i)); + printf("%s", (const char *)i->data); } alpm_list_free(list); #undef addlist @@ -905,7 +905,7 @@ int main(int argc, char *argv[]) printf("DB Path : %s\n", alpm_option_get_dbpath(config->handle)); printf("Cache Dirs: "); for(i = alpm_option_get_cachedirs(config->handle); i; i = alpm_list_next(i)) { - printf("%s ", (char *)alpm_list_getdata(i)); + printf("%s ", (const char *)i->data); } printf("\n"); printf("Lock File : %s\n", alpm_option_get_lockfile(config->handle)); -- cgit v1.2.3-54-g00ecf