X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Futils_cmd_putnotif.c;h=956ed745cffdd102a824bc8bc363e8bc102d74e7;hb=71bbf854d3e6f8c6d6c3582527263bb01a3a7e04;hp=530d153ea91437b0375b20eed65e85f426d5a5e8;hpb=add25ce6f3129cb7138e96e5f55d11de1e5cf6de;p=collectd.git diff --git a/src/utils_cmd_putnotif.c b/src/utils_cmd_putnotif.c index 530d153e..956ed745 100644 --- a/src/utils_cmd_putnotif.c +++ b/src/utils_cmd_putnotif.c @@ -29,6 +29,7 @@ #include "plugin.h" #include "utils_parse_option.h" +#include "utils_cmd_putnotif.h" #define print_to_socket(fh, ...) \ do { \ @@ -118,7 +119,7 @@ static int set_option (notification_t *n, const char *option, const char *value) int handle_putnotif (FILE *fh, char *buffer) { char *command; - notification_t n; + notification_t n = { 0 }; int status; if ((fh == NULL) || (buffer == NULL)) @@ -142,8 +143,6 @@ int handle_putnotif (FILE *fh, char *buffer) return (-1); } - memset (&n, '\0', sizeof (n)); - status = 0; while (*buffer != 0) {