X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Ftarget_notification.c;h=63e4f3154f15b97356a012560c2242cb06bb7db5;hb=cd5c60931ef73c6c34be6dcf58538b069be17c58;hp=55b72ac1acf330f15ea8899aa8181ca134a64bd3;hpb=e7b4b1f7f9e56cecd797b854c5a96582c5f9dd57;p=collectd.git diff --git a/src/target_notification.c b/src/target_notification.c index 55b72ac1..63e4f315 100644 --- a/src/target_notification.c +++ b/src/target_notification.c @@ -192,7 +192,7 @@ static int tn_invoke (const data_set_t *ds, value_list_t *vl, /* {{{ */ notification_meta_t __attribute__((unused)) **meta, void **user_data) { tn_data_t *data; - notification_t n; + notification_t n = { 0 }; char temp[NOTIF_MAX_MSG_LEN]; gauge_t *rates; @@ -211,7 +211,6 @@ static int tn_invoke (const data_set_t *ds, value_list_t *vl, /* {{{ */ } /* Initialize the structure. */ - memset (&n, 0, sizeof (n)); n.severity = data->severity; n.time = cdtime (); sstrncpy (n.message, data->message, sizeof (n.message)); @@ -276,9 +275,8 @@ static int tn_invoke (const data_set_t *ds, value_list_t *vl, /* {{{ */ void module_register (void) { - target_proc_t tproc; + target_proc_t tproc = { 0 }; - memset (&tproc, 0, sizeof (tproc)); tproc.create = tn_create; tproc.destroy = tn_destroy; tproc.invoke = tn_invoke;