};
static enum plginst_field plugin_instance_format[PLGINST_MAX_FIELDS] =
- { plginst_name };
+ { plginst_none };
/* InterfaceFormat. */
enum if_field {
{
if (virInitialize () != 0)
return -1;
-
- return 0;
+ else
+ return 0;
}
static int
}
for (i = 0; i < n; ++i) {
- if (strcasecmp (fields[i], "name") == 0)
+ if (strcasecmp (fields[i], "none") == 0) {
+ plugin_instance_format[i] = plginst_none;
+ break;
+ } else if (strcasecmp (fields[i], "name") == 0)
plugin_instance_format[i] = plginst_name;
else if (strcasecmp (fields[i], "uuid") == 0)
plugin_instance_format[i] = plginst_uuid;
int *domids;
/* Get list of domains. */
- domids = malloc (sizeof (int) * n);
- if (domids == 0) {
+ domids = malloc (sizeof (*domids) * n);
+ if (domids == NULL) {
ERROR (PLUGIN_NAME " plugin: malloc failed.");
return -1;
}
}
static void
-free_domains ()
+free_domains (void)
{
int i;
}
static void
-free_block_devices ()
+free_block_devices (void)
{
int i;
}
static void
-free_interface_devices ()
+free_interface_devices (void)
{
int i;