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:
parent
eb523bfb51
commit
3d7cf72070
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user