diff --git a/src/libvirt.c b/src/libvirt.c
index bd09abfa0103498c55fd791a17458c415ddadd5f..370e794a709f84547bb78924a6b26ada2b0b798d 100644 (file)
--- a/src/libvirt.c
+++ b/src/libvirt.c
@@ -634,7 +634,7 @@ ignore_device_match (ignorelist_t *il, const char *domname, const char *devpath)
ERROR ("libvirt plugin: malloc failed.");
return 0;
}
- snprintf (name, n, "%s:%s", domname, devpath);
+ ssnprintf (name, n, "%s:%s", domname, devpath);
r = ignorelist_match (il, name);
free (name);
return r;
vl->time = t;
vl->interval = interval_g;
- strncpy (vl->plugin, "libvirt", sizeof (vl->plugin));
- vl->plugin[sizeof (vl->plugin) - 1] = '\0';
+ sstrncpy (vl->plugin, "libvirt", sizeof (vl->plugin));
vl->host[0] = '\0';
host_ptr = vl->host;
vl.values = values;
vl.values_len = 1;
- strncpy (vl.type, type, sizeof (vl.type));
+ sstrncpy (vl.type, type, sizeof (vl.type));
plugin_dispatch_values (&vl);
}
vl.values = values;
vl.values_len = 1;
- strncpy (vl.type, type, sizeof (vl.type));
- snprintf (vl.type_instance, sizeof (vl.type_instance), "%d", vcpu_nr);
- vl.type_instance[sizeof (vl.type_instance) - 1] = '\0';
+ sstrncpy (vl.type, type, sizeof (vl.type));
+ ssnprintf (vl.type_instance, sizeof (vl.type_instance), "%d", vcpu_nr);
plugin_dispatch_values (&vl);
}
vl.values = values;
vl.values_len = 2;
- strncpy (vl.type, type, sizeof (vl.type));
- strncpy (vl.type_instance, devname, sizeof (vl.type_instance));
- vl.type_instance[sizeof (vl.type_instance) - 1] = '\0';
+ sstrncpy (vl.type, type, sizeof (vl.type));
+ sstrncpy (vl.type_instance, devname, sizeof (vl.type_instance));
plugin_dispatch_values (&vl);
} /* void submit_counter2 */