work around daft warning

John Tytgat John.Tytgat@aaug.net
Fri May 18 10:57:00 GMT 2012


In message <20120518054902.GB29815@bubble.grove.modra.org>
          Alan Modra <amodra@gmail.com> wrote:

> +	      if (asprintf (&label, "%c%s", leading_char, name))
> +		{ /* Avoid warning */ }

When asprintf() fails, contents of label is undefined, isn't it better
to have label = NULL in the if () body ? Not sure whether the rest of
the code can deal with label being NULL...

John.
-- 
John Tytgat, in his comfy chair at home
John.Tytgat@aaug.net



More information about the Binutils mailing list