This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Simplify --sysroot=/


On Okt 29 2018, Alan Modra <amodra@gmail.com> wrote:

> diff --git a/ld/ldmain.c b/ld/ldmain.c
> index 464192049a..6f3ce6f810 100644
> --- a/ld/ldmain.c
> +++ b/ld/ldmain.c
> @@ -584,21 +584,25 @@ static const char *
>  get_sysroot (int argc, char **argv)
>  {
>    int i;
> -  const char *path;
> +  const char *path = NULL;
>  
>    for (i = 1; i < argc; i++)
>      if (CONST_STRNEQ (argv[i], "--sysroot="))
> -      return argv[i] + strlen ("--sysroot=");
> +      path = argv[i] + strlen ("--sysroot=");

Should this break out?

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."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]