libc: remove open-coded strlen in _gettemp

This commit is contained in:
Mateusz Guzik 2021-01-24 05:32:46 +01:00
parent 97a463120b
commit 6fe328ace8

View File

@ -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);