summaryrefslogtreecommitdiff
path: root/gcc/tlink.c
diff options
context:
space:
mode:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2000-11-02 19:03:59 +0000
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2000-11-02 19:03:59 +0000
commit78dbff7cf909ce370d16c2b4c185ec01e419fe4c (patch)
tree79fd392a778483e0dba0d31c32d9d005dc4fdeeb /gcc/tlink.c
parenta3f30566986f897fcef17b98f722a0227de49492 (diff)
downloadgcc-78dbff7cf909ce370d16c2b4c185ec01e419fe4c.tar.gz
* collect2.c (main, write_c_file_stat), gcc.c (translate_options,
process_command, main), gcov.c (open_files, output_data), tlink.c (frob_extension, scan_linker_output), toplev.c (file_name_nondirectory): Use strchr () and strrchr () instead of index () and rindex (). cp: * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c (build_overload_value), repo.c (open_repo_file), xref.c (open_xref_file): Use strchr () and strrchr () instead of index () and rindex (). f: * com.c (open_include_file, ffecom_open_include_): Use strchr () and strrchr () instead of index () and rindex (). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37206 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tlink.c')
-rw-r--r--gcc/tlink.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/tlink.c b/gcc/tlink.c
index e96f6dc6ae9..8758556c14c 100644
--- a/gcc/tlink.c
+++ b/gcc/tlink.c
@@ -327,10 +327,10 @@ frob_extension (s, ext)
const char *s;
const char *ext;
{
- const char *p = rindex (s, '/');
+ const char *p = strrchr (s, '/');
if (! p)
p = s;
- p = rindex (p, '.');
+ p = strrchr (p, '.');
if (! p)
p = s + strlen (s);
@@ -652,12 +652,12 @@ scan_linker_output (fname)
q = 0;
/* First try `GNU style'. */
- p = index (oldq, '`');
+ p = strchr (oldq, '`');
if (p)
- p++, q = index (p, '\'');
+ p++, q = strchr (p, '\'');
/* Then try "double quotes". */
- else if (p = index (oldq, '"'), p)
- p++, q = index (p, '"');
+ else if (p = strchr (oldq, '"'), p)
+ p++, q = strchr (p, '"');
/* Don't let the strstr's below see the demangled name; we
might get spurious matches. */