xc_physinfo_t *physinfo;
- physinfo = calloc(1, sizeof(xc_physinfo_t));
+ physinfo = calloc(1, sizeof(*physinfo));
if (physinfo == NULL) {
ERROR("xencpu plugin: calloc() for physinfo failed.");
xc_interface_close(xc_handle);
INFO("xencpu plugin: Found %" PRIu32 " processors.", num_cpus);
- cpu_info = calloc(num_cpus, sizeof(xc_cpuinfo_t));
+ cpu_info = calloc(num_cpus, sizeof(*cpu_info));
if (cpu_info == NULL) {
ERROR("xencpu plugin: calloc() for num_cpus failed.");
xc_interface_close(xc_handle);
return ENOMEM;
}
- cpu_states = calloc(num_cpus, sizeof(value_to_rate_state_t));
+ cpu_states = calloc(num_cpus, sizeof(*cpu_states));
if (cpu_states == NULL) {
ERROR("xencpu plugin: calloc() for cpu_states failed.");
xc_interface_close(xc_handle);