Replaced calls to the custom strindex() and strrindex() functions with the
exactly equivalent and standard strchr() and strrchr() functions instead.
This commit is contained in:
@@ -12,12 +12,12 @@ sys_lock(path)
|
||||
{
|
||||
char buf[1024];
|
||||
char *tmpf = ".lockXXXXXX";
|
||||
char *strrindex(), *strcpy(), *mktemp();
|
||||
char *strrchr(), *strcpy(), *mktemp();
|
||||
char *p;
|
||||
int ok, fd;
|
||||
|
||||
strcpy(buf, path);
|
||||
if (p = strrindex(buf, '/')) {
|
||||
if (p = strrchr(buf, '/')) {
|
||||
++p;
|
||||
strcpy(p, tmpf);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user