summaryrefslogtreecommitdiff
path: root/install
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2012-08-18 11:38:02 +0100
committerHarald Hoyer <harald@redhat.com>2012-08-21 18:46:20 +0200
commit68c49db95233d03a25b27e01709cd052d60cef7a (patch)
treebfc7d595fa762e5ca59299236f5d8b251c4d529e /install
parentf9c7788ba5bbb9785ba9946c7a6500fc0c782244 (diff)
downloaddracut-68c49db95233d03a25b27e01709cd052d60cef7a.tar.gz
dracut-68c49db95233d03a25b27e01709cd052d60cef7a.tar.bz2
dracut-68c49db95233d03a25b27e01709cd052d60cef7a.zip
install/dracut-install.c: No need to compare the NULL byte each time.
Diffstat (limited to 'install')
-rw-r--r--install/dracut-install.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/install/dracut-install.c b/install/dracut-install.c
index dfee2596..c95b7c25 100644
--- a/install/dracut-install.c
+++ b/install/dracut-install.c
@@ -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;