From: Louis Taylor Date: Tue, 15 Jan 2019 18:51:31 +0000 (+0000) Subject: tree-wide: use '"' instead of '\"' X-Git-Tag: v241-rc1~45^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e768a4f03273c17b787b2c56c63852acaef28ce5;p=thirdparty%2Fsystemd.git tree-wide: use '"' instead of '\"' The escape used previously was redundant and made things more confusing. --- diff --git a/src/basic/env-file.c b/src/basic/env-file.c index 1fec9480335..7f10f9ad39e 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); diff --git a/src/boot/efi/boot.c b/src/boot/efi/boot.c index 5aae7e7c06b..9bf6895831b 100644 --- a/src/boot/efi/boot.c +++ b/src/boot/efi/boot.c @@ -1000,7 +1000,7 @@ skip: value++; /* unquote */ - if (value[0] == '\"' && line[linelen-1] == '\"') { + if (value[0] == '"' && line[linelen-1] == '"') { value++; line[linelen-1] = '\0'; } diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c index 525a948f360..15ef0f19ff8 100644 --- a/src/shared/logs-show.c +++ b/src/shared/logs-show.c @@ -724,7 +724,7 @@ void json_escape( fputs(" ]", f); } else { - fputc('\"', f); + fputc('"', f); while (l > 0) { if (IN_SET(*p, '"', '\\')) { @@ -741,7 +741,7 @@ void json_escape( l--; } - fputc('\"', f); + fputc('"', f); } } diff --git a/src/shared/xml.c b/src/shared/xml.c index cb34d870c19..27090762642 100644 --- a/src/shared/xml.c +++ b/src/shared/xml.c @@ -191,7 +191,7 @@ int xml_tokenize(const char **p, char **name, void **state, unsigned *line) { if (*c == '=') { c++; - if (IN_SET(*c, '\'', '\"')) { + if (IN_SET(*c, '\'', '"')) { /* Tag with a quoted value */ e = strchr(c+1, *c);