summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-04-15 03:11:11 +0200
committerLennart Poettering <lennart@poettering.net>2010-04-15 03:11:15 +0200
commit9e2f7c11fb6ba35ffec2274da3e2d08b10d23965 (patch)
treef25721469627d5ea25a9b2e77c2f5a13c9d7aefd /util.c
parent9fcc065a773b3804a84fe27e9089d76bfe0061fa (diff)
core: add minimal templating system
Diffstat (limited to 'util.c')
-rw-r--r--util.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/util.c b/util.c
index 17ee09c1f7..5f36819fa3 100644
--- a/util.c
+++ b/util.c
@@ -1041,16 +1041,15 @@ char *bus_path_escape(const char *s) {
return r;
}
-char *bus_path_unescape(const char *s) {
+char *bus_path_unescape(const char *f) {
char *r, *t;
- const char *f;
- assert(s);
+ assert(f);
- if (!(r = new(char, strlen(s)+1)))
+ if (!(r = strdup(f)))
return NULL;
- for (f = s, t = r; *f; f++) {
+ for (t = r; *f; f++) {
if (*f == '_') {
int a, b;