diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-04-15 03:11:11 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-04-15 03:11:15 +0200 |
commit | 9e2f7c11fb6ba35ffec2274da3e2d08b10d23965 (patch) | |
tree | f25721469627d5ea25a9b2e77c2f5a13c9d7aefd /util.c | |
parent | 9fcc065a773b3804a84fe27e9089d76bfe0061fa (diff) |
core: add minimal templating system
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -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; |