mirror of
https://github.com/systemd/systemd.git
synced 2024-12-23 21:35:11 +03:00
logs-show: use GREEDY_REALLOC_APPEND()
This commit is contained in:
parent
afcd9c60fe
commit
8f2bcb1fb2
@ -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. */
|
* Exiting as otherwise this problem would cause an infinite loop. */
|
||||||
goto finish;
|
goto finish;
|
||||||
|
|
||||||
if (!GREEDY_REALLOC(boots, n_boots + 1))
|
if (!GREEDY_REALLOC_APPEND(boots, n_boots, &boot, 1))
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
boots[n_boots++] = boot;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
finish:
|
finish:
|
||||||
|
Loading…
Reference in New Issue
Block a user