diff --git a/src/memory.c b/src/memory.c
index 5cb574dc9f18ef3c8dace1d9e90a6e0041c526ac..c9cb83402fbf4c42d4164b379944778afebbc33a 100644 (file)
--- a/src/memory.c
+++ b/src/memory.c
strcpy (vl.host, hostname_g);
strcpy (vl.plugin, "memory");
strcpy (vl.type, "memory");
- strncpy (vl.type_instance, type_instance, sizeof (vl.type_instance));
- vl.type_instance[sizeof (vl.type_instance) - 1] = '\0';
+ sstrncpy (vl.type_instance, type_instance, sizeof (vl.type_instance));
plugin_dispatch_values (&vl);
}