diff options
author | Sami Kerola | 2012-10-12 21:23:54 +0200 |
---|---|---|
committer | Karel Zak | 2012-10-22 10:13:32 +0200 |
commit | 913e43b8e2dedbac69880e26fc1eead509fb666e (patch) | |
tree | 641afdbe6475341ec2e73781b48b48898ef752e0 /sys-utils/eject.c | |
parent | fsck.cramfs: compile with -DINCLUDE_FS_TESTS for make check (diff) | |
download | kernel-qcow2-util-linux-913e43b8e2dedbac69880e26fc1eead509fb666e.tar.gz kernel-qcow2-util-linux-913e43b8e2dedbac69880e26fc1eead509fb666e.tar.xz kernel-qcow2-util-linux-913e43b8e2dedbac69880e26fc1eead509fb666e.zip |
libmount, eject: replace index() and rindex() with strrch() or strrchr()
Both index() and rindex() are legacy functions which may be withdrawn in
a future.
Reference: http://pubs.opengroup.org/onlinepubs/009695399/functions/index.html
Reference: http://pubs.opengroup.org/onlinepubs/009695399/functions/rindex.html
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'sys-utils/eject.c')
-rw-r--r-- | sys-utils/eject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys-utils/eject.c b/sys-utils/eject.c index 1a5b83409..5d5d7b18b 100644 --- a/sys-utils/eject.c +++ b/sys-utils/eject.c @@ -499,7 +499,7 @@ static int read_speed(const char *devname) if (!f) err(EXIT_FAILURE, _("cannot open %s"), _PATH_PROC_CDROMINFO); - name = rindex(devname, '/') + 1; + name = strrchr(devname, '/') + 1; while (name && !feof(f)) { char line[512]; |