} while (0)
/* Connection. */
-static virConnectPtr conn = 0;
-static char *conn_string = NULL;
+static virConnectPtr conn;
+static char *conn_string;
static c_complain_t conn_complain = C_COMPLAIN_INIT_STATIC;
/* Node information required for %CPU */
static int interval = 60;
/* List of domains, if specified. */
-static ignorelist_t *il_domains = NULL;
+static ignorelist_t *il_domains;
/* List of block devices, if specified. */
-static ignorelist_t *il_block_devices = NULL;
+static ignorelist_t *il_block_devices;
/* List of network interface devices, if specified. */
-static ignorelist_t *il_interface_devices = NULL;
+static ignorelist_t *il_interface_devices;
static int ignore_device_match(ignorelist_t *, const char *domname,
const char *devpath);
* domain_event_cb_id to '-1'
*/
thread_data->domain_event_cb_id = -1;
- thread_data->is_active = 0;
+ pthread_mutex_lock(&thread_data->active_mutex);
+ thread_data->is_active = false;
+ pthread_mutex_unlock(&thread_data->active_mutex);
return 0;
}
struct interface_device *new_ptr;
int new_size =
sizeof(state->interface_devices[0]) * (state->nr_interface_devices + 1);
- char *path_copy, *address_copy, number_string[15];
+ char *path_copy, *address_copy, number_string[21];
if ((path == NULL) || (address == NULL))
return EINVAL;