aboutsummaryrefslogtreecommitdiff
path: root/gdb/source.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/source.c')
-rw-r--r--gdb/source.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/gdb/source.c b/gdb/source.c
index 9a30209..00052e6 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -1025,16 +1025,11 @@ find_and_open_source (const char *filename,
}
}
- gdb::unique_xmalloc_ptr<char> rewritten_filename;
- if (IS_ABSOLUTE_PATH (filename))
- {
- /* If filename is absolute path, try the source path
- substitution on it. */
- rewritten_filename = rewrite_source_path (filename);
+ gdb::unique_xmalloc_ptr<char> rewritten_filename
+ = rewrite_source_path (filename);
- if (rewritten_filename != NULL)
- filename = rewritten_filename.get ();
- }
+ if (rewritten_filename != NULL)
+ filename = rewritten_filename.get ();
result = openp (path, OPF_SEARCH_IN_PATH | OPF_RETURN_REALPATH, filename,
OPEN_MODE, fullname);