From 9e53c10a0f64bc1ab70877c245d5a8e08c509575 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 3 Mar 2021 13:35:40 +0100 Subject: Flagsify EscapeStyle and make ESCAPE_BACKSLASH_ONELINE implicit I want to tweak behaviour further, and that'll be easier when "style" is converted to a bitfield. Some callers used ESCAPE_BACKSLASH_ONELINE, and others not. But the ones that didn't, simply didn't care, because the argument was assumed to be one-line anyway (e.g. a service name). In environment-generator, this could make a difference. But I think it's better to escape the newlines there too. So newlines are now always escaped, to simplify the code and the test matrix. --- src/environment-d-generator/environment-d-generator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/environment-d-generator') diff --git a/src/environment-d-generator/environment-d-generator.c b/src/environment-d-generator/environment-d-generator.c index 1c51cf6b2c..5372f6cec2 100644 --- a/src/environment-d-generator/environment-d-generator.c +++ b/src/environment-d-generator/environment-d-generator.c @@ -70,7 +70,7 @@ static int load_and_print(void) { t = strchr(*i, '='); assert(t); - q = shell_maybe_quote(t + 1, ESCAPE_BACKSLASH); + q = shell_maybe_quote(t + 1, 0); if (!q) return log_oom(); -- cgit v1.2.1