forked from Imagelibrary/binutils-gdb
merge from gcc
This commit is contained in:
@@ -299,11 +299,17 @@ make_relative_prefix_1 (const char *progname, const char *bin_prefix,
|
||||
full_progname = strdup(progname);
|
||||
|
||||
prog_dirs = split_directories (full_progname, &prog_num);
|
||||
bin_dirs = split_directories (bin_prefix, &bin_num);
|
||||
free (full_progname);
|
||||
if (bin_dirs == NULL || prog_dirs == NULL)
|
||||
if (prog_dirs == NULL)
|
||||
return NULL;
|
||||
|
||||
bin_dirs = split_directories (bin_prefix, &bin_num);
|
||||
if (bin_dirs == NULL)
|
||||
{
|
||||
free_split_directories (prog_dirs);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Remove the program name from comparison of directory names. */
|
||||
prog_num--;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user