projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
afcd9c6
)
logs-show: use GREEDY_REALLOC_APPEND()
author
Yu Watanabe
<watanabe.yu+github@gmail.com>
Fri, 26 Apr 2024 02:31:48 +0000
(11:31 +0900)
committer
Yu Watanabe
<watanabe.yu+github@gmail.com>
Fri, 10 May 2024 02:43:57 +0000
(11:43 +0900)
src/shared/logs-show.c
patch
|
blob
|
history
diff --git
a/src/shared/logs-show.c
b/src/shared/logs-show.c
index 9851fd3646f665e34e83882eddde6d5542a9ff0f..c96f501f0ef8c8a3778133b8c8043d976254fae3 100644
(file)
--- a/
src/shared/logs-show.c
+++ b/
src/shared/logs-show.c
@@
-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: