- cpu_states = calloc (num_cpus, sizeof (value_to_rate_state_t));
- if (cpu_states == NULL)
- {
- ERROR ("xencpu plugin: calloc() for cpu_states failed.");
- xc_interface_close(xc_handle);
- free(cpu_info);
- return (ENOMEM);
- }
+ cpu_info = calloc(num_cpus, sizeof(xc_cpuinfo_t));
+ 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));
+ if (cpu_states == NULL) {
+ ERROR("xencpu plugin: calloc() for cpu_states failed.");
+ xc_interface_close(xc_handle);
+ free(cpu_info);
+ return ENOMEM;
+ }