From 6c183c283bb7d5aadfa98c8fb218e4a9bb424e45 Mon Sep 17 00:00:00 2001 From: Vaclav Dolezal Date: Tue, 29 Aug 2017 14:31:06 +0200 Subject: fdisk: use strutils to trim whitespace from input Signed-off-by: Vaclav Dolezal --- include/strutils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/strutils.h') diff --git a/include/strutils.h b/include/strutils.h index be1ba6737..5d07fcc7c 100644 --- a/include/strutils.h +++ b/include/strutils.h @@ -213,7 +213,7 @@ static inline size_t ltrim_whitespace(unsigned char *str) len = strlen((char *) p); - if (len && p > str) + if (p > str) memmove(str, p, len + 1); return len; -- cgit v1.2.3-55-g7522