install/dracut-install.c: No need to compare the NULL byte each time.
parent
f9c7788ba5
commit
68c49db952
|
@ -63,7 +63,7 @@ static size_t dir_len(char const *file)
|
||||||
{
|
{
|
||||||
size_t length;
|
size_t length;
|
||||||
/* Strip the basename and any redundant slashes before it. */
|
/* Strip the basename and any redundant slashes before it. */
|
||||||
for (length = strlen(file); 0 < length; length--)
|
for (length = strlen(file)-1; 0 < length; length--)
|
||||||
if (file[length] == '/' && file[length-1] != '/')
|
if (file[length] == '/' && file[length-1] != '/')
|
||||||
break;
|
break;
|
||||||
return length;
|
return length;
|
||||||
|
|
Loading…
Reference in New Issue