From: John Kohl Date: Mon, 29 Oct 1990 14:22:26 +0000 (+0000) Subject: change rindex to strrchr X-Git-Tag: krb5-1.0-alpha2~48 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=55fa6e4d76702cbcca7befa752202645f50c807d;p=krb5.git change rindex to strrchr git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1363 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/admin/create/kdb5_create.c b/src/admin/create/kdb5_create.c index 47d487f21..ba7614713 100644 --- a/src/admin/create/kdb5_create.c +++ b/src/admin/create/kdb5_create.c @@ -124,8 +124,8 @@ char *argv[]; initialize_kdb5_error_table(); initialize_isod_error_table(); - if (rindex(argv[0], '/')) - argv[0] = rindex(argv[0], '/')+1; + if (strrchr(argv[0], '/')) + argv[0] = strrchr(argv[0], '/')+1; while ((optchar = getopt(argc, argv, "d:r:k:M:e:")) != EOF) { switch(optchar) { diff --git a/src/admin/destroy/kdb5_destroy.c b/src/admin/destroy/kdb5_destroy.c index 9ce08c93a..3d9d22775 100644 --- a/src/admin/destroy/kdb5_destroy.c +++ b/src/admin/destroy/kdb5_destroy.c @@ -57,8 +57,8 @@ char *argv[]; initialize_kdb5_error_table(); initialize_isod_error_table(); - if (rindex(argv[0], '/')) - argv[0] = rindex(argv[0], '/')+1; + if (strrchr(argv[0], '/')) + argv[0] = strrchr(argv[0], '/')+1; while ((optchar = getopt(argc, argv, "d:")) != EOF) { switch(optchar) { diff --git a/src/admin/stash/kdb5_stash.c b/src/admin/stash/kdb5_stash.c index 34dfb4aae..fd52e0c9c 100644 --- a/src/admin/stash/kdb5_stash.c +++ b/src/admin/stash/kdb5_stash.c @@ -63,8 +63,8 @@ char *argv[]; int keytypedone = 0; krb5_enctype etype = -1; - if (rindex(argv[0], '/')) - argv[0] = rindex(argv[0], '/')+1; + if (strrchr(argv[0], '/')) + argv[0] = strrchr(argv[0], '/')+1; initialize_krb5_error_table(); initialize_kdb5_error_table(); diff --git a/src/clients/kdestroy/kdestroy.c b/src/clients/kdestroy/kdestroy.c index 5b1b9f682..ba4d9a9ee 100644 --- a/src/clients/kdestroy/kdestroy.c +++ b/src/clients/kdestroy/kdestroy.c @@ -39,8 +39,8 @@ main(argc, argv) krb5_init_ets(); - if (rindex(argv[0], '/')) - argv[0] = rindex(argv[0], '/')+1; + if (strrchr(argv[0], '/')) + argv[0] = strrchr(argv[0], '/')+1; while ((c = getopt(argc, argv, "c:")) != EOF) { switch (c) { diff --git a/src/clients/kinit/kinit.c b/src/clients/kinit/kinit.c index 3e1f1e191..637bdfa71 100644 --- a/src/clients/kinit/kinit.c +++ b/src/clients/kinit/kinit.c @@ -67,8 +67,8 @@ main(argc, argv) krb5_init_ets(); - if (rindex(argv[0], '/')) - argv[0] = rindex(argv[0], '/')+1; + if (strrchr(argv[0], '/')) + argv[0] = strrchr(argv[0], '/')+1; while ((option = getopt(argc, argv, "rpl:c:")) != EOF) { switch (option) { diff --git a/src/clients/klist/klist.c b/src/clients/klist/klist.c index a42115ecb..dacca4885 100644 --- a/src/clients/klist/klist.c +++ b/src/clients/klist/klist.c @@ -46,8 +46,8 @@ main(argc, argv) initialize_isod_error_table(); - if (rindex(argv[0], '/')) - argv[0] = rindex(argv[0], '/')+1; + if (strrchr(argv[0], '/')) + argv[0] = strrchr(argv[0], '/')+1; while ((c = getopt(argc, argv, "fc:")) != EOF) { switch (c) {