[dm-devel] [PATCH 4/5] libmultipath: simplify basenamecpy()
Hannes Reinecke
hare at suse.de
Tue Dec 17 07:04:07 UTC 2013
strlcpy() already does a strlen() at the end, so no need
to call it explicitly.
Signed-off-by: Hannes Reinecke <hare at suse.de>
---
libmultipath/util.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/libmultipath/util.c b/libmultipath/util.c
index 93ab08b..06a6311 100644
--- a/libmultipath/util.c
+++ b/libmultipath/util.c
@@ -44,8 +44,7 @@ basenamecpy (const char * str1, char * str2, int str2len)
strncpy(str2, p, str2len);
str2[str2len - 1] = '\0';
- strchop(str2);
- return strlen(str2);
+ return strchop(str2);
}
int
--
1.7.12.4
More information about the dm-devel
mailing list