@cryptotaxi247 / netdata-1 / commits / 1ba7c2851

Stop reading from /proc/sys/kernel/osrelease at trailing newline. (#9374)

Remove new line that was creating wrong log information.

Jeff Cook committed Jun 27, 2020 at 05:12 UTC 1ba7c2851eac680a1619a902085e813138958453
1 file changed +1 -1
libnetdata/ebpf/ebpf.c
+1 -1
@@ -87,7 +87,7 @@ int get_kernel_version(char *out, int size) {
87 return -1;
88
89 move = patch;
90 - while (*version) *move++ = *version++;
90 + while (*version && *version != '\n') *move++ = *version++;
91 *move = '\0';
92
93 fd = snprintf(out, (size_t)size, "%s.%s.%s", major, minor, patch);