chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
b7c94af
)
util-lib: drop unnecessary NULL check
author
Lennart Poettering
<lennart@poettering.net>
Fri, 2 Dec 2016 16:01:19 +0000
(17:01 +0100)
committer
Sven Eden
<yamakuzure@gmx.net>
Mon, 17 Jul 2017 15:58:35 +0000
(17:58 +0200)
DEFINE_TRIVIAL_CLEANUP_FUNC() already does that check, no need to duplicate it.
src/basic/rm-rf.h
patch
|
blob
|
history
diff --git
a/src/basic/rm-rf.h
b/src/basic/rm-rf.h
index f693a5bb7c52bbadbf8424f9edde4d8f65952b02..e13f7003e3e73d515466ff91bfc15e9be58376fc 100644
(file)
--- 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);
}