1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-24 21:34:08 +03:00

manager: replace fake block with a strjoina

The block was created to avoid declaring variables in the middle of the block.
We could now do that, but it's easier to just use strjoina here.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2018-10-10 13:27:28 +02:00
parent eb523bfb51
commit 3d7cf72070

View File

@ -3112,11 +3112,8 @@ int manager_serialize(
continue; continue;
t = manager_timestamp_to_string(q); t = manager_timestamp_to_string(q);
{ const char *field = strjoina(t, "-timestamp");
char field[strlen(t) + STRLEN("-timestamp") + 1]; dual_timestamp_serialize(f, field, m->timestamps + q);
strcpy(stpcpy(field, t), "-timestamp");
dual_timestamp_serialize(f, field, m->timestamps + q);
}
} }
if (!switching_root) if (!switching_root)