From ef8bbd2ac496604df949e0bce978a3c53dbaede3 Mon Sep 17 00:00:00 2001 From: Aurelien Foret Date: Thu, 5 Jan 2006 21:29:36 +0000 Subject: various code cleanup --- lib/libalpm/list.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'lib/libalpm') diff --git a/lib/libalpm/list.h b/lib/libalpm/list.h index e9bb173e..d1cdb385 100644 --- a/lib/libalpm/list.h +++ b/lib/libalpm/list.h @@ -33,14 +33,11 @@ typedef struct __pmlist_t PMList; #define FREELIST(p) do { if(p) { pm_list_free(p); p = NULL; } } while(0) #define FREELISTPTR(p) do { \ - if(p) { \ - PMList *i; \ - for(i = p; i; i = i->next) { \ - i->data = NULL; \ - } \ - pm_list_free(p); \ - p = NULL; \ + PMList *i; \ + for(i = p; i; i = i->next) { \ + i->data = NULL; \ } \ + FREELIST(p); \ } while(0) /* Sort comparison callback function declaration */ -- cgit v1.2.3-24-g4f1b