From: Paul Eggert Date: Fri, 8 Nov 2024 06:32:41 +0000 (-0800) Subject: basenc: prefer xpalloc to xnrealloc X-Git-Tag: v9.6~95 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d00ab4d1106d81b9299c96ec4ec50d9f17172a2d;p=thirdparty%2Fcoreutils.git basenc: prefer xpalloc to xnrealloc * src/basenc.c (prepare_inbuf): Prefer xpalloc to xnrealloc. --- diff --git a/src/basenc.c b/src/basenc.c index ba3186a222..f9b364d3aa 100644 --- a/src/basenc.c +++ b/src/basenc.c @@ -325,10 +325,8 @@ static void prepare_inbuf (struct base_decode_context *ctx, idx_t inlen) { if (ctx->bufsize < inlen) - { - ctx->bufsize = inlen * 2; - ctx->inbuf = xnrealloc (ctx->inbuf, ctx->bufsize, sizeof (char)); - } + ctx->inbuf = xpalloc (ctx->inbuf, &ctx->bufsize, + inlen - ctx->bufsize, -1, sizeof *ctx->inbuf); }