diff options
author | Aurelien Foret <aurelien@archlinux.org> | 2006-01-05 21:29:36 +0000 |
---|---|---|
committer | Aurelien Foret <aurelien@archlinux.org> | 2006-01-05 21:29:36 +0000 |
commit | ef8bbd2ac496604df949e0bce978a3c53dbaede3 (patch) | |
tree | 001130e87fe62a68344d88b65f11021c9312d48d /src/pacman/list.h | |
parent | 13cb20aeabe147629b22a6c85b6791044bbae465 (diff) |
various code cleanup
Diffstat (limited to 'src/pacman/list.h')
-rw-r--r-- | src/pacman/list.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/pacman/list.h b/src/pacman/list.h index 79a4a3c0..ba72d784 100644 --- a/src/pacman/list.h +++ b/src/pacman/list.h @@ -30,6 +30,14 @@ typedef struct __list_t { } list_t; #define FREELIST(p) do { if(p) { list_free(p); p = NULL; } } while(0) +#define FREELISTPTR(p) do { \ + list_t *i; \ + for(i = p; i; i = i->next) { \ + i->data = NULL; \ + } \ + FREELIST(p); \ +} while(0) + list_t *list_new(void); void list_free(list_t* list); |