mirror of
https://github.com/troglobit/finit.git
synced 2026-11-06 15:51:03 +00:00
Refactor, rindex() --> strrchr(), LEGACY as of POSIX.1-2001
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
75aa14466f
commit
36e001d636
1 file changed
+1
-1
@@ -74,7 +74,7 @@ svc_t *svc_new(char *cmd, int id, int type)
|
|||||||
strlcpy(svc->cmd, cmd, sizeof(svc->cmd));
|
strlcpy(svc->cmd, cmd, sizeof(svc->cmd));
|
||||||
|
|
||||||
/* Default description, if missing */
|
/* Default description, if missing */
|
||||||
desc = rindex(cmd, '/');
|
desc = strrchr(cmd, '/');
|
||||||
if (desc)
|
if (desc)
|
||||||
desc++;
|
desc++;
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in new issue
Block a user