From: Theodore Tso Date: Sat, 30 Oct 1993 23:02:09 +0000 (+0000) Subject: Change use of index and rindex to strchr and strrchr X-Git-Tag: krb5-1.0-beta3~171 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9b974e283d12d72e194cea1329c2230248c985b9;p=krb5.git Change use of index and rindex to strchr and strrchr git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2719 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/appl/bsd/krlogin.c b/src/appl/bsd/krlogin.c index fd4cb7114..5ebb581de 100644 --- a/src/appl/bsd/krlogin.c +++ b/src/appl/bsd/krlogin.c @@ -86,6 +86,7 @@ static char sccsid[] = "@(#)rlogin.c 5.12 (Berkeley) 9/19/88"; #include #include #include +#include #ifdef KERBEROS #include @@ -136,7 +137,7 @@ struct sockaddr_in local, foreign; # define SIGUSR1 30 # endif /* SIGUSR1 */ -char *index(), *rindex(), *getenv(), *strcat(), *strcpy(); +char *getenv(); #ifndef convex struct passwd *getpwuid(); #endif @@ -266,8 +267,8 @@ main(argc, argv) int debug_port = 0; #endif /* KERBEROS */ - if (rindex(argv[0], '/')) - argv[0] = rindex(argv[0], '/')+1; + if (strrchr(argv[0], '/')) + argv[0] = strrchr(argv[0], '/')+1; if ( argc < 2 ) goto usage; argc--; @@ -590,7 +591,6 @@ struct ltchars defltc; struct ltchars noltc = { -1, -1, -1, -1, -1, -1 }; - doit(oldmask) { #ifdef USE_TERMIO @@ -1217,7 +1217,7 @@ void try_normal(argv) UCB_RLOGIN); fflush(stderr); - host = rindex(argv[0], '/'); + host = strrchr(argv[0], '/'); if (host) host++; else