summaryrefslogtreecommitdiffstats
path: root/lib/libalpm
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2008-04-19 19:51:28 +0200
committerDan McGee <dan@archlinux.org>2008-04-19 22:59:40 +0200
commit64e1dd64a4512a5faa34e6007e64314569593522 (patch)
tree00aa88e97f65bf36622bb8566b3a11aaeba4da20 /lib/libalpm
parentbf84c232664fdce4861a2b94ce895c2b160b355a (diff)
downloadpacman-64e1dd64a4512a5faa34e6007e64314569593522.tar.gz
pacman-64e1dd64a4512a5faa34e6007e64314569593522.tar.xz
Remove unnecessary NULL check in FREE() macro
free() is designed to do nothing if it is passed a NULL pointer, so there is no need to check for it on our end. Change/fix the macro. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/util.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libalpm/util.h b/lib/libalpm/util.h
index 74b4f981..6c7a05e9 100644
--- a/lib/libalpm/util.h
+++ b/lib/libalpm/util.h
@@ -47,7 +47,7 @@
/* This strdup macro is NULL safe- copying NULL will yield NULL */
#define STRDUP(r, s, action) do { if(s != NULL) { r = strdup(s); if(r == NULL) { ALLOC_FAIL(strlen(s)); action; } } else { r = NULL; } } while(0)
-#define FREE(p) do { if(p) { free(p); p = NULL; } } while(0)
+#define FREE(p) do { free(p); p = NULL; } while(0)
#define ASSERT(cond, action) do { if(!(cond)) { action; } } while(0)