summaryrefslogtreecommitdiff
path: root/src/basic/env-file.c
diff options
context:
space:
mode:
authorLouis Taylor <louis@kragniz.eu>2019-01-15 18:51:31 +0000
committerLouis Taylor <louis@kragniz.eu>2019-01-17 16:46:29 +0000
commite768a4f03273c17b787b2c56c63852acaef28ce5 (patch)
tree30ea36e185de000a0e2d43f55893c4ee09a70927 /src/basic/env-file.c
parente4a8db1fbd89592899f22fa68e9769e1afc98581 (diff)
downloadsystemd-e768a4f03273c17b787b2c56c63852acaef28ce5.tar.gz
tree-wide: use '"' instead of '\"'
The escape used previously was redundant and made things more confusing.
Diffstat (limited to 'src/basic/env-file.c')
-rw-r--r--src/basic/env-file.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/basic/env-file.c b/src/basic/env-file.c
index 1fec948033..7f10f9ad39 100644
--- a/src/basic/env-file.c
+++ b/src/basic/env-file.c
@@ -112,7 +112,7 @@ static int parse_env_file_internal(
} else if (c == '\'')
state = SINGLE_QUOTE_VALUE;
- else if (c == '\"')
+ else if (c == '"')
state = DOUBLE_QUOTE_VALUE;
else if (c == '\\')
state = VALUE_ESCAPE;
@@ -195,7 +195,7 @@ static int parse_env_file_internal(
break;
case DOUBLE_QUOTE_VALUE:
- if (c == '\"')
+ if (c == '"')
state = PRE_VALUE;
else if (c == '\\')
state = DOUBLE_QUOTE_VALUE_ESCAPE;
@@ -517,7 +517,7 @@ static void write_env_var(FILE *f, const char *v) {
fwrite_unlocked(v, 1, p-v, f);
if (string_has_cc(p, NULL) || chars_intersect(p, WHITESPACE SHELL_NEED_QUOTES)) {
- fputc_unlocked('\"', f);
+ fputc_unlocked('"', f);
for (; *p; p++) {
if (strchr(SHELL_NEED_ESCAPE, *p))
@@ -526,7 +526,7 @@ static void write_env_var(FILE *f, const char *v) {
fputc_unlocked(*p, f);
}
- fputc_unlocked('\"', f);
+ fputc_unlocked('"', f);
} else
fputs_unlocked(p, f);