summaryrefslogtreecommitdiffstats
path: root/bin/ln/ln.c
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2011-03-15 22:22:11 +0000
committerjilles <jilles@FreeBSD.org>2011-03-15 22:22:11 +0000
commit2a22eeb6a28bb219e787817ae7115613920e719a (patch)
tree51d3edc3f3e8fc771fae62fa6aadc747bf88f069 /bin/ln/ln.c
parent8060d27e7b3f7a6ad07e1d27babfa72f124b7663 (diff)
downloadFreeBSD-src-2a22eeb6a28bb219e787817ae7115613920e719a.zip
FreeBSD-src-2a22eeb6a28bb219e787817ae7115613920e719a.tar.gz
bin: Prefer strrchr() to rindex().
This removes the last index/rindex usage from /bin.
Diffstat (limited to 'bin/ln/ln.c')
-rw-r--r--bin/ln/ln.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/ln/ln.c b/bin/ln/ln.c
index fc3afc1..e5fdeee 100644
--- a/bin/ln/ln.c
+++ b/bin/ln/ln.c
@@ -80,7 +80,7 @@ main(int argc, char *argv[])
* "link", for which the functionality provided is greatly
* simplified.
*/
- if ((p = rindex(argv[0], '/')) == NULL)
+ if ((p = strrchr(argv[0], '/')) == NULL)
p = argv[0];
else
++p;
OpenPOWER on IntegriCloud