libc: remove open-coded strlen in _gettemp
This commit is contained in:
parent
97a463120b
commit
6fe328ace8
@ -131,8 +131,7 @@ _gettemp(int dfd, char *path, int *doopen, int domkdir, int slen, int oflags)
|
||||
return (0);
|
||||
}
|
||||
|
||||
for (trv = path; *trv != '\0'; ++trv)
|
||||
;
|
||||
trv = path + strlen(path);
|
||||
if (trv - path >= MAXPATHLEN) {
|
||||
errno = ENAMETOOLONG;
|
||||
return (0);
|
||||
|
Loading…
Reference in New Issue
Block a user