summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHauke Mehrtens2026-04-08 22:13:42 +0000
committerHauke Mehrtens2026-06-18 22:06:38 +0000
commit8a28fbfab1b037b5f5a46e2fc37f551bf1eb6880 (patch)
tree3ead12ef80e136858f99e9e842c2cf6e8af7f0e6
parent815633847cd32ffe6da28943cbeb37edc88265c8 (diff)
downloadlibubox-8a28fbfab1b037b5f5a46e2fc37f551bf1eb6880.tar.gz
blob: fix wrong type for realloc result in blob_buffer_grow()
The local variable holding the realloc() result was declared as struct blob_buf * but buf->buf is void *. Use void * to match the actual type and avoid confusion. Link: https://github.com/openwrt/libubox/pull/42 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> (cherry picked from commit 2982bfb1c325ca139dc4b2ca891c69c3ab5f5a7e)
-rw-r--r--blob.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/blob.c b/blob.c
index abcc9f2..735e5d5 100644
--- a/blob.c
+++ b/blob.c
@@ -21,7 +21,7 @@
static bool
blob_buffer_grow(struct blob_buf *buf, int minlen)
{
- struct blob_buf *new;
+ void *new;
int delta = ((minlen / 256) + 1) * 256;
new = realloc(buf->buf, buf->buflen + delta);
if (new) {