summaryrefslogtreecommitdiff
path: root/src/basic/util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-10-26 17:30:56 +0100
committerLennart Poettering <lennart@poettering.net>2015-10-27 13:25:55 +0100
commit5f311f8c0e51e2f13773823feb6a71f7c6f2838c (patch)
tree6edfc648016e7000715e11c1ede94fde32e88d82 /src/basic/util.c
parente4e73a632524c382139034d4271f53b6089ab4cb (diff)
util: remove path_get_parent(), in favour of dirname_malloc()
We don't need two functions that do essentialy the same, hence drop path_get_parent(), and stick to dirname_malloc(), but move it to path-util.[ch].
Diffstat (limited to 'src/basic/util.c')
-rw-r--r--src/basic/util.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/basic/util.c b/src/basic/util.c
index 5e3a363bb4..f403dca10e 100644
--- a/src/basic/util.c
+++ b/src/basic/util.c
@@ -398,24 +398,6 @@ int dir_is_empty(const char *path) {
return 1;
}
-char* dirname_malloc(const char *path) {
- char *d, *dir, *dir2;
-
- d = strdup(path);
- if (!d)
- return NULL;
- dir = dirname(d);
- assert(dir);
-
- if (dir != d) {
- dir2 = strdup(dir);
- free(d);
- return dir2;
- }
-
- return dir;
-}
-
void rename_process(const char name[8]) {
assert(name);