vl.values = values;
vl.values_len = 1;
vl.time = time (NULL);
- strcpy (vl.host, hostname_g);
- strcpy (vl.plugin, "ntpd");
- strcpy (vl.plugin_instance, "");
+ sstrncpy (vl.host, hostname_g, sizeof (vl.host));
+ sstrncpy (vl.plugin, "ntpd", sizeof (vl.plugin));
+ sstrncpy (vl.plugin_instance, "", sizeof (vl.plugin_instance));
sstrncpy (vl.type, type, sizeof (vl.type));
sstrncpy (vl.type_instance, type_inst, sizeof (vl.type_instance));
if (pkt_item_len < res_item_size)
pkt_padding = res_item_size - pkt_item_len;
DEBUG ("res_item_size = %i; pkt_padding = %i;",
- res_item_size, pkt_padding);
+ res_item_size, (int) pkt_padding);
/* Extract the sequence number */
pkt_sequence = INFO_SEQ (res.auth_seq);
* We start by allocating some more memory.
*/
DEBUG ("realloc (%p, %i)", (void *) *res_data,
- (items_num + pkt_item_num) * res_item_size);
+ (int) (items_num + pkt_item_num) * res_item_size);
items = realloc ((void *) *res_data,
(items_num + pkt_item_num) * res_item_size);
if (items == NULL)