strrchr not rindex
authorMark Eichin <eichin@mit.edu>
Tue, 9 Aug 1994 03:53:47 +0000 (03:53 +0000)
committerMark Eichin <eichin@mit.edu>
Tue, 9 Aug 1994 03:53:47 +0000 (03:53 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4082 dc483132-0cff-0310-8789-dd5450dbe970

src/appl/telnet/telnet/commands.c

index e76eabf113f466de004c4237f0a953036d54cf0d..d58221ce3be474cb0791479b5b82d651022407f1 100644 (file)
@@ -1403,12 +1403,11 @@ shell(argc, argv)
             * Fire up the shell in the child.
             */
            register char *shellp, *shellname;
-           extern char *rindex();
 
            shellp = getenv("SHELL");
            if (shellp == NULL)
                shellp = "/bin/sh";
-           if ((shellname = rindex(shellp, '/')) == 0)
+           if ((shellname = strrchr(shellp, '/')) == 0)
                shellname = shellp;
            else
                shellname++;