[PATCH] Remove some alloca uses
John Baldwin
jhb@FreeBSD.org
Sat Apr 20 20:27:19 GMT 2024
On 4/17/24 3:52 PM, Tom Tromey wrote:
> A few spots (mostly in the parsers) use alloca to ensure that a string
> is terminated before passing it to a printf-like function (mostly
> 'error'). However, this isn't needed as the "%.*s" format can be used
> instead.
>
> This patch makes this change.
>
> In one spot the alloca is dead code and is simply removed.
Approved-By: John Baldwin <jhb@FreeBSD.org>
--
John Baldwin
More information about the Gdb-patches
mailing list