abuf: Add a helper for initing and allocating a buffer
authorSimon Glass <sjg@chromium.org>
Thu, 1 May 2025 13:37:01 +0000 (07:37 -0600)
committerSimon Glass <sjg@chromium.org>
Fri, 30 May 2025 08:49:31 +0000 (09:49 +0100)
commit97b586695cd80821455ae06ee178c6c8cf759ce6
tree51e652168f67b87cfc9fd044079d83a2b574ba7f
parenta619c4410956f446510749b6dc3989849616b7a0
abuf: Add a helper for initing and allocating a buffer

This construct appears in various places. Reduce code size by adding a
function for it.

It inits the abuf, then allocates it to the requested size.

Signed-off-by: Simon Glass <sjg@chromium.org>
boot/cedit.c
boot/scene.c
boot/scene_textline.c
include/abuf.h
lib/abuf.c
lib/of_live.c
test/lib/abuf.c