Skip to content

Commit 068f2c4

Browse files
YHNdnzjbluca
authored andcommitted
core/unit-serialize: fix serialization of markers
Follow-up for ff68472 (cherry picked from commit 5ce8d7d) (cherry picked from commit 6f30e56) (cherry picked from commit 4a9f42e) (cherry picked from commit b030bfb) (cherry picked from commit bf01f3d)
1 parent 7c20ebe commit 068f2c4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/core/unit-serialize.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,12 @@ static int serialize_markers(FILE *f, unsigned markers) {
3939
if (markers == 0)
4040
return 0;
4141

42+
bool space = false;
43+
4244
fputs("markers=", f);
4345
for (UnitMarker m = 0; m < _UNIT_MARKER_MAX; m++)
4446
if (FLAGS_SET(markers, 1u << m))
45-
fputs(unit_marker_to_string(m), f);
47+
fputs_with_space(f, unit_marker_to_string(m), /* separator = */ NULL, &space);
4648
fputc('\n', f);
4749
return 0;
4850
}

0 commit comments

Comments
 (0)