summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-12-02 17:01:19 +0100
committerLennart Poettering <lennart@poettering.net>2016-12-07 18:38:41 +0100
commit9f3c7fc1ad0d3d46e14b737e912ae8ca15f4e072 (patch)
tree03bd4ca5a50d389dfa1774ae781e0c32389ea0cf /src
parent9153b02bb5030e29d6008992fb74b9028d7c392c (diff)
util-lib: drop unnecessary NULL check
DEFINE_TRIVIAL_CLEANUP_FUNC() already does that check, no need to duplicate it.
Diffstat (limited to 'src')
-rw-r--r--src/basic/rm-rf.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/basic/rm-rf.h b/src/basic/rm-rf.h
index f693a5bb7c..e13f7003e3 100644
--- a/src/basic/rm-rf.h
+++ b/src/basic/rm-rf.h
@@ -33,8 +33,6 @@ int rm_rf(const char *path, RemoveFlags flags);
/* Useful for usage with _cleanup_(), destroys a directory and frees the pointer */
static inline void rm_rf_physical_and_free(char *p) {
- if (!p)
- return;
(void) rm_rf(p, REMOVE_ROOT|REMOVE_PHYSICAL);
free(p);
}