mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-09-01 14:17:37 +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:
@ -3112,12 +3112,9 @@ int manager_serialize(
|
||||
continue;
|
||||
|
||||
t = manager_timestamp_to_string(q);
|
||||
{
|
||||
char field[strlen(t) + STRLEN("-timestamp") + 1];
|
||||
strcpy(stpcpy(field, t), "-timestamp");
|
||||
const char *field = strjoina(t, "-timestamp");
|
||||
dual_timestamp_serialize(f, field, m->timestamps + q);
|
||||
}
|
||||
}
|
||||
|
||||
if (!switching_root)
|
||||
(void) serialize_environment(f, m->environment);
|
||||
|
Reference in New Issue
Block a user