diff options
author | thiagoftsm <thiagoftsm@gmail.com> | 2020-02-19 18:10:07 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-19 13:10:07 -0500 |
commit | 1f345aac5e6fb342a3db326770c5576fad26d9d4 (patch) | |
tree | 5c1fcaefea4632f4fa5158128628d754d02e86e9 /collectors | |
parent | 420d972c18819c9b8cd56ec7b8ab7f5f897a3512 (diff) |
Ebpf coverity (#8135)
* Fix coverity errors on libnetdata/ebpf
* Fix coverity warnings inside ebpf collector
Diffstat (limited to 'collectors')
-rw-r--r-- | collectors/ebpf_process.plugin/ebpf_process.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/collectors/ebpf_process.plugin/ebpf_process.c b/collectors/ebpf_process.plugin/ebpf_process.c index 4a58a54dcc..8c7a34aa1a 100644 --- a/collectors/ebpf_process.plugin/ebpf_process.c +++ b/collectors/ebpf_process.plugin/ebpf_process.c @@ -170,11 +170,11 @@ static void int_exit(int sig) dup2 (fd, STDIN_FILENO); dup2 (fd, STDOUT_FILENO); dup2 (fd, STDERR_FILENO); - - if (fd > 2) - close (fd); } + if (fd > 2) + close (fd); + int sid = setsid(); if(sid >= 0) { sleep(1); @@ -213,9 +213,9 @@ static inline void netdata_write_chart_cmd(char *type , order); } -static void netdata_write_global_dimension(char *dimension, char *name) +static void netdata_write_global_dimension(char *d, char *n) { - printf("DIMENSION %s %s absolute 1 1\n", dimension, name); + printf("DIMENSION %s %s absolute 1 1\n", d, n); } static void netdata_create_global_dimension(void *ptr, int end) |