commit | 34ecba1f7616b388ee28490e8a3ed43fb1463011 | [log] [tgz] |
---|---|---|
author | Simon Glass <sjg@chromium.org> | Mon Aug 14 16:40:22 2023 -0600 |
committer | Tom Rini <trini@konsulko.com> | Fri Aug 25 13:54:33 2023 -0400 |
tree | d2c174f76f0afe9055d7e03daefac4b810407424 | |
parent | 633b3dc75536a7a878126c41babc248c095b66fe [diff] |
abuf: Allow incrementing the size Provide a convenience function to increment the size of the abuf. Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/lib/abuf.c b/lib/abuf.c index bd27046..ce2cff5 100644 --- a/lib/abuf.c +++ b/lib/abuf.c
@@ -82,6 +82,11 @@ } } +bool abuf_realloc_inc(struct abuf *abuf, size_t inc) +{ + return abuf_realloc(abuf, abuf->size + inc); +} + void *abuf_uninit_move(struct abuf *abuf, size_t *sizep) { void *ptr;