X Tutup
Skip to content

Commit f9761a8

Browse files
committed
shared/conf-parser: turn CONFIG_PARSE_REFUSE_BOM flag into a local variable
This is an internal implementation detail.
1 parent bdf2357 commit f9761a8

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/shared/conf-parser.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ int config_parse(const char *unit,
282282
_cleanup_free_ char *section = NULL, *continuation = NULL;
283283
_cleanup_fclose_ FILE *ours = NULL;
284284
unsigned line = 0, section_line = 0;
285-
bool section_ignored = false;
285+
bool section_ignored = false, bom_seen = false;
286286
int r;
287287

288288
assert(filename);
@@ -328,13 +328,13 @@ int config_parse(const char *unit,
328328
continue;
329329

330330
l = buf;
331-
if (!(flags & CONFIG_PARSE_REFUSE_BOM)) {
331+
if (!bom_seen) {
332332
char *q;
333333

334334
q = startswith(buf, UTF8_BYTE_ORDER_MARK);
335335
if (q) {
336336
l = q;
337-
flags |= CONFIG_PARSE_REFUSE_BOM;
337+
bom_seen = true;
338338
}
339339
}
340340

src/shared/conf-parser.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ typedef enum ConfigParseFlags {
1717
CONFIG_PARSE_RELAXED = 1 << 0,
1818
CONFIG_PARSE_ALLOW_INCLUDE = 1 << 1,
1919
CONFIG_PARSE_WARN = 1 << 2,
20-
CONFIG_PARSE_REFUSE_BOM = 1 << 3,
2120
} ConfigParseFlags;
2221

2322
/* Argument list for parsers of specific configuration settings. */

0 commit comments

Comments
 (0)
X Tutup