install/dracut-install.c: No need to compare the NULL byte each time.

master
Colin Guthrie 2012-08-18 11:38:02 +01:00 committed by Harald Hoyer
parent f9c7788ba5
commit 68c49db952
1 changed files with 1 additions and 1 deletions

View File

@ -63,7 +63,7 @@ static size_t dir_len(char const *file)
{
size_t length;
/* 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] != '/')
break;
return length;