Browse Source

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

master
Colin Guthrie 13 years ago committed by Harald Hoyer
parent
commit
68c49db952
  1. 2
      install/dracut-install.c

2
install/dracut-install.c

@ -63,7 +63,7 @@ static size_t dir_len(char const *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;

Loading…
Cancel
Save