summaryrefslogtreecommitdiffstats
path: root/libnetdata
diff options
context:
space:
mode:
authorJeff Cook <jeff@jeffcook.io>2020-06-27 05:12:45 -0600
committerGitHub <noreply@github.com>2020-06-27 11:12:45 +0000
commit1ba7c2851eac680a1619a902085e813138958453 (patch)
tree1c4ae828577e62d6f25b1b8894301e1b6c55693e /libnetdata
parentaf0c3b2e05819eed2b09f1fc84cf759ead8b502a (diff)
Stop reading from /proc/sys/kernel/osrelease at trailing newline. (#9374)
Remove new line that was creating wrong log information.
Diffstat (limited to 'libnetdata')
-rw-r--r--libnetdata/ebpf/ebpf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libnetdata/ebpf/ebpf.c b/libnetdata/ebpf/ebpf.c
index df1ff7da4b..7788108137 100644
--- a/libnetdata/ebpf/ebpf.c
+++ b/libnetdata/ebpf/ebpf.c
@@ -87,7 +87,7 @@ int get_kernel_version(char *out, int size) {
return -1;
move = patch;
- while (*version) *move++ = *version++;
+ while (*version && *version != '\n') *move++ = *version++;
*move = '\0';
fd = snprintf(out, (size_t)size, "%s.%s.%s", major, minor, patch);