1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-22 17:35:35 +03:00

logs-show: use GREEDY_REALLOC_APPEND()

This commit is contained in:
Yu Watanabe 2024-04-26 11:31:48 +09:00
parent afcd9c60fe
commit 8f2bcb1fb2

View File

@ -2024,10 +2024,8 @@ int journal_get_boots(sd_journal *j, BootId **ret_boots, size_t *ret_n_boots) {
* Exiting as otherwise this problem would cause an infinite loop. */
goto finish;
if (!GREEDY_REALLOC(boots, n_boots + 1))
if (!GREEDY_REALLOC_APPEND(boots, n_boots, &boot, 1))
return -ENOMEM;
boots[n_boots++] = boot;
}
finish: