diff options
author | Vaclav Dolezal | 2017-08-29 14:31:06 +0200 |
---|---|---|
committer | Vaclav Dolezal | 2017-08-29 15:26:39 +0200 |
commit | 6c183c283bb7d5aadfa98c8fb218e4a9bb424e45 (patch) | |
tree | 0cf064fe1c64b2ee3c424ed6046ccdae20cb39fe /include/strutils.h | |
parent | fdisk: fix copy from readline and whitespace stripping (diff) | |
download | kernel-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/strutils.h')
-rw-r--r-- | include/strutils.h | 2 |
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; |