This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] RISC-V: Improve li expansion for better code density.
- From: Andreas Schwab <schwab at suse dot de>
- To: Kito Cheng <kito dot cheng at sifive dot com>
- Cc: binutils at sourceware dot org, kito dot cheng at gmail dot com, jimw at sifive dot com
- Date: Thu, 22 Aug 2019 10:05:42 +0200
- Subject: Re: [PATCH] RISC-V: Improve li expansion for better code density.
- References: <1566456017-9152-1-git-send-email-kito.cheng@sifive.com>
On Aug 21 2019, Kito Cheng <kito.cheng@sifive.com> wrote:
> + else
> + {
> + /* In case buf is not enough, malloc a large enough buffer
> + and try again. */
> + dynbuf_len = r + 1;
> + dynbuf = (char *) xmalloc (dynbuf_len);
> + r = vsnprintf (dynbuf, dynbuf_len, format, ap);
You can use vasprintf instead.
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."