summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorVaclav Dolezal2017-08-29 14:31:06 +0200
committerVaclav Dolezal2017-08-29 15:26:39 +0200
commit6c183c283bb7d5aadfa98c8fb218e4a9bb424e45 (patch)
tree0cf064fe1c64b2ee3c424ed6046ccdae20cb39fe /include
parentfdisk: fix copy from readline and whitespace stripping (diff)
downloadkernel-qcow2-util-linux-6c183c283bb7d5aadfa98c8fb218e4a9bb424e45.tar.gz
kernel-qcow2-util-linux-6c183c283bb7d5aadfa98c8fb218e4a9bb424e45.tar.xz
kernel-qcow2-util-linux-6c183c283bb7d5aadfa98c8fb218e4a9bb424e45.zip
fdisk: use strutils to trim whitespace from input
Signed-off-by: Vaclav Dolezal <vdolezal@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/strutils.h2
1 files changed, 1 insertions, 1 deletions
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;