summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-01-18 16:39:04 +0100
committerLennart Poettering <lennart@poettering.net>2012-01-18 16:39:04 +0100
commit31ed59c51126fce7d958c188772a397e2a1ed010 (patch)
tree4283457ed50bb46e3cbf86bcc5bb06e1f3479a1a /src/util.c
parent88f06645623467f9c8db88afca64557d62e38c61 (diff)
tmpfiles: support writing short strings to files, in order to support /sys manipulations at boot time, a la sysctl
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/util.c b/src/util.c
index 8004bebbd1..fbc37c4f0c 100644
--- a/src/util.c
+++ b/src/util.c
@@ -4118,7 +4118,8 @@ char *unquote(const char *s, const char* quotes) {
size_t l;
assert(s);
- if ((l = strlen(s)) < 2)
+ l = strlen(s);
+ if (l < 2)
return strdup(s);
if (strchr(quotes, s[0]) && s[l-1] == s[0])