summaryrefslogtreecommitdiff
path: root/src/shared/conf-parser.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-11-22 10:53:26 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-11-22 13:11:35 +0100
commitf9761a89a84fb4aa4502238334c1a40e6d052000 (patch)
treea8dbb06adb1324b8d01dfc06bd406ebcbe5f9162 /src/shared/conf-parser.c
parentbdf2357c12e775ca2c9491d4117227dfc992881c (diff)
downloadsystemd-f9761a89a84fb4aa4502238334c1a40e6d052000.tar.gz
shared/conf-parser: turn CONFIG_PARSE_REFUSE_BOM flag into a local variable
This is an internal implementation detail.
Diffstat (limited to 'src/shared/conf-parser.c')
-rw-r--r--src/shared/conf-parser.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c
index 3269d83031..648ac1aa94 100644
--- a/src/shared/conf-parser.c
+++ b/src/shared/conf-parser.c
@@ -282,7 +282,7 @@ int config_parse(const char *unit,
_cleanup_free_ char *section = NULL, *continuation = NULL;
_cleanup_fclose_ FILE *ours = NULL;
unsigned line = 0, section_line = 0;
- bool section_ignored = false;
+ bool section_ignored = false, bom_seen = false;
int r;
assert(filename);
@@ -328,13 +328,13 @@ int config_parse(const char *unit,
continue;
l = buf;
- if (!(flags & CONFIG_PARSE_REFUSE_BOM)) {
+ if (!bom_seen) {
char *q;
q = startswith(buf, UTF8_BYTE_ORDER_MARK);
if (q) {
l = q;
- flags |= CONFIG_PARSE_REFUSE_BOM;
+ bom_seen = true;
}
}