X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fnuma.c;h=e16538324f98aaa881b52c5e8d611a16340e1a28;hb=c76419c0cf983f1ecd3d36aa236cc4e3f9cff733;hp=a87a17e9df7c7c0780aa730a280b30c984a94995;hpb=0657d95eaa686d64efe6bbccda346ebd6467bd0b;p=collectd.git diff --git a/src/numa.c b/src/numa.c index a87a17e9..e1653832 100644 --- a/src/numa.c +++ b/src/numa.c @@ -25,6 +25,7 @@ **/ #include "collectd.h" + #include "common.h" #include "plugin.h" @@ -46,7 +47,6 @@ static void numa_dispatch_value (int node, /* {{{ */ vl.values = &v; vl.values_len = 1; - sstrncpy (vl.host, hostname_g, sizeof (vl.host)); sstrncpy (vl.plugin, "numa", sizeof (vl.plugin)); ssnprintf (vl.plugin_instance, sizeof (vl.plugin_instance), "node%i", node); sstrncpy (vl.type, "vmpage_action", sizeof (vl.type)); @@ -130,11 +130,10 @@ static int numa_init (void) /* {{{ */ while (42) { char path[PATH_MAX]; - struct stat statbuf; + struct stat statbuf = { 0 }; int status; ssnprintf (path, sizeof (path), NUMA_ROOT_DIR "/node%i", max_node + 1); - memset (&statbuf, 0, sizeof (statbuf)); status = stat (path, &statbuf); if (status == 0)