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
1 changed files with 2 additions and 5 deletions

View File

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