Re: [PATCH 2/3] tools/bootconfig: Consolidate xbc_init() to error message wrapper
From: Google
Date: Thu Sep 10 2026 - 11:51:31 EST
On Thu, 10 Sep 2026 14:30:02 +0900
Sang-Heon Jeon <ekffu200098@xxxxxxxxx> wrote:
> > +static int init_xbc_with_error(char *buf, int len)
> > +{
> > + char *copy = malloc(len);
> > + const char *msg;
> > + int ret, pos;
> > +
> > + if (!copy)
> > + return -ENOMEM;
> > +
> > + memcpy(copy, buf, len);
>
> Can we remove this? xbc_init() already copies buf and does not change
> it, so show_xbc_error() can use buf directly.
Ah, good catch! OK, let me fix it.
Thanks,
--
Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>