According to "man rindex" on debian bullseye rindex() was deprecated
in Posix.1-2001 and removed from Posix.1-2008.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
/* IPv4 or IPv6 address?
*
- * Use rindex() because we need the right-most ':' below for
+ * Use strrchr() because we need the right-most ':' below for
* IPv4-mapped IPv6 addresses anyway...
*/
- p = rindex(str, ':');
+ p = strrchr(str, ':');
if (p == NULL) {
ret = ipv4_from_string(str, &addr->ip);
} else {
return EINVAL;
}
- p = rindex(s, ':');
+ p = strrchr(s, ':');
if (p == NULL) {
return EINVAL;
}
return EINVAL;
}
- p = rindex(s, '/');
+ p = strrchr(s, '/');
if (p == NULL) {
return EINVAL;
}