aboutsummaryrefslogtreecommitdiff
path: root/sbin/shutdown
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/shutdown')
-rw-r--r--sbin/shutdown/shutdown.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/shutdown/shutdown.c b/sbin/shutdown/shutdown.c
index 7bd93a0c0881..6e662a8b6f44 100644
--- a/sbin/shutdown/shutdown.c
+++ b/sbin/shutdown/shutdown.c
@@ -123,7 +123,7 @@ main(int argc, char **argv)
* Test for the special case where the utility is called as
* "poweroff", for which it runs 'shutdown -p now'.
*/
- if ((p = rindex(argv[0], '/')) == NULL)
+ if ((p = strrchr(argv[0], '/')) == NULL)
p = argv[0];
else
++p;