Unified string handling.
[collectd.git] / src / dns.c
index b61d768..c315eab 100644 (file)
--- a/src/dns.c
+++ b/src/dns.c
@@ -301,8 +301,8 @@ static void submit_counter (const char *type, const char *type_instance,
        vl.time = time (NULL);
        strcpy (vl.host, hostname_g);
        strcpy (vl.plugin, "dns");
-       strncpy (vl.type, type, sizeof (vl.type));
-       strncpy (vl.type_instance, type_instance, sizeof (vl.type_instance));
+       sstrncpy (vl.type, type, sizeof (vl.type));
+       sstrncpy (vl.type_instance, type_instance, sizeof (vl.type_instance));
 
        plugin_dispatch_values (&vl);
 } /* void submit_counter */