summaryrefslogtreecommitdiffstats
path: root/lib/libcam/camlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libcam/camlib.c')
-rw-r--r--lib/libcam/camlib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libcam/camlib.c b/lib/libcam/camlib.c
index 47ca384..525ad2f 100644
--- a/lib/libcam/camlib.c
+++ b/lib/libcam/camlib.c
@@ -137,7 +137,7 @@ cam_get_device(const char *path, char *dev_name, int devnamelen, int *unit)
*/
if (*tmpstr == '/') {
tmpstr2 = tmpstr;
- tmpstr = (char *)rindex(tmpstr2, '/');
+ tmpstr = strrchr(tmpstr2, '/');
if ((tmpstr != NULL) && (*tmpstr != '\0'))
tmpstr++;
}
OpenPOWER on IntegriCloud