diff options
author | Sami Kerola | 2019-05-16 12:44:38 +0200 |
---|---|---|
committer | Sami Kerola | 2019-05-16 12:45:47 +0200 |
commit | b94acada9ed0e11a7e82f8f60280c5b6058e4250 (patch) | |
tree | fa71cfce760acb6c5c3f57e891726b770a07a773 /include | |
parent | column: fix "maybe be" duplication (diff) | |
download | kernel-qcow2-util-linux-b94acada9ed0e11a7e82f8f60280c5b6058e4250.tar.gz kernel-qcow2-util-linux-b94acada9ed0e11a7e82f8f60280c5b6058e4250.tar.xz kernel-qcow2-util-linux-b94acada9ed0e11a7e82f8f60280c5b6058e4250.zip |
lscpu: move trailing null after removing characters from a string
From the test input string ':' characters are removed:
cat x86_64-epyc_7451/sys/devices/system/cpu/vulnerabilities/spectre_v2
Mitigation: Full AMD retpoline, IBPB: conditional, STIBP: disabled, RSB filling
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'include')
-rw-r--r-- | include/strutils.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/strutils.h b/include/strutils.h index 5584ac5ec..50733c5f5 100644 --- a/include/strutils.h +++ b/include/strutils.h @@ -262,6 +262,7 @@ static inline void strrem(char *s, int rem) if (*s != rem) *p++ = *s; } + *p = '\0'; } extern char *strnappend(const char *s, const char *suffix, size_t b); |