util-lib: drop unnecessary NULL check

DEFINE_TRIVIAL_CLEANUP_FUNC() already does that check, no need to duplicate it.
This commit is contained in:
Lennart Poettering
2016-12-07 18:38:41 +01:00
parent 9153b02bb5
commit 9f3c7fc1ad
-2
View File
@@ -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);
}