mirror of
https://github.com/troglobit/finit.git
synced 2026-10-29 12:40:44 +00:00
util: new function unquote()
Refactor to reduce code duplication Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
4 files changed
+26
-28
No files matched your search
+1
-8
@@ -460,14 +460,7 @@ static void source_env(svc_t *svc)
|
||||
value++;
|
||||
|
||||
/* unquote value, if quoted */
|
||||
if (value[0] == '"' || value[0] == '\'') {
|
||||
char q = value[0];
|
||||
|
||||
if (*end == q) {
|
||||
value = &value[1];
|
||||
*end = 0;
|
||||
}
|
||||
}
|
||||
unquote(&value, end);
|
||||
|
||||
/* find end of key */
|
||||
end = key;
|
||||
|
||||
Reference in new issue
Block a user