From: Joseph C. Lehner Date: Fri, 5 Feb 2016 11:56:15 +0000 (+0200) Subject: Use strrchr instead of rindex X-Git-Tag: v0.9~46 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a0382e9245360c0891e3a8dd630f561ed1135bb8;p=oweals%2Fnmrpflash.git Use strrchr instead of rindex --- diff --git a/tftp.c b/tftp.c index 4e6b094..a87f426 100644 --- a/tftp.c +++ b/tftp.c @@ -44,8 +44,8 @@ static const char *x_basename(const char *path) { const char *slash, *bslash; - slash = rindex(path, '/'); - bslash = rindex(path, '\\'); + slash = strrchr(path, '/'); + bslash = strrchr(path, '\\'); if (slash && bslash) { path = 1 + (slash > bslash ? slash : bslash);