summaryrefslogtreecommitdiffstats
path: root/lib/libalpm
diff options
context:
space:
mode:
authorAurelien Foret <aurelien@archlinux.org>2006-01-05 21:29:36 +0000
committerAurelien Foret <aurelien@archlinux.org>2006-01-05 21:29:36 +0000
commitef8bbd2ac496604df949e0bce978a3c53dbaede3 (patch)
tree001130e87fe62a68344d88b65f11021c9312d48d /lib/libalpm
parent13cb20aeabe147629b22a6c85b6791044bbae465 (diff)
downloadpacman-ef8bbd2ac496604df949e0bce978a3c53dbaede3.tar.xz
various code cleanup
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/list.h11
1 files changed, 4 insertions, 7 deletions
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 */