summaryrefslogtreecommitdiff
path: root/gcc/cp/xref.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/xref.c')
-rw-r--r--gcc/cp/xref.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/cp/xref.c b/gcc/cp/xref.c
index 9a1fd976202..cf99fcd400b 100644
--- a/gcc/cp/xref.c
+++ b/gcc/cp/xref.c
@@ -811,14 +811,14 @@ open_xref_file(file)
#ifdef XREF_FILE_NAME
XREF_FILE_NAME (xref_name, file);
#else
- s = rindex (file, '/');
+ s = strrchr (file, '/');
if (s == NULL)
sprintf (xref_name, ".%s.gxref", file);
else
{
++s;
strcpy (xref_name, file);
- t = rindex (xref_name, '/');
+ t = strrchr (xref_name, '/');
++t;
*t++ = '.';
strcpy (t, s);