aboutsummaryrefslogtreecommitdiff
path: root/libiberty/make-relative-prefix.c
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2008-03-24 18:06:37 +0000
committerDJ Delorie <dj@redhat.com>2008-03-24 18:06:37 +0000
commitdaddbc6edd327f44cc7093696f487c4a9e689132 (patch)
tree1b1cc1cf469478623d48b9faf7bfb94f9e5c5276 /libiberty/make-relative-prefix.c
parentc5b48eacfa0f8cade0bf4a11729509e833bcff63 (diff)
downloadfsf-binutils-gdb-daddbc6edd327f44cc7093696f487c4a9e689132.zip
fsf-binutils-gdb-daddbc6edd327f44cc7093696f487c4a9e689132.tar.gz
fsf-binutils-gdb-daddbc6edd327f44cc7093696f487c4a9e689132.tar.bz2
merge from gcc
Diffstat (limited to 'libiberty/make-relative-prefix.c')
-rw-r--r--libiberty/make-relative-prefix.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/libiberty/make-relative-prefix.c b/libiberty/make-relative-prefix.c
index 80e7f92..c98d287 100644
--- a/libiberty/make-relative-prefix.c
+++ b/libiberty/make-relative-prefix.c
@@ -292,14 +292,12 @@ make_relative_prefix_1 (const char *progname, const char *bin_prefix,
}
}
- if ( resolve_links )
- {
- full_progname = lrealpath (progname);
- if (full_progname == NULL)
- return NULL;
- }
+ if (resolve_links)
+ full_progname = lrealpath (progname);
else
- full_progname = strdup(progname);
+ full_progname = strdup (progname);
+ if (full_progname == NULL)
+ return NULL;
prog_dirs = split_directories (full_progname, &prog_num);
free (full_progname);