X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fvirt.c;h=e5a8725381d2cf56a7e3e4ea01ddff6481276d82;hb=644786a90e054facf2ba1a393f1e4a86c2bee0c5;hp=b9da68e71416938e3fa78c207d2663499b0273b9;hpb=ccc4feb9576f520596508418f404beb000fde1aa;p=collectd.git diff --git a/src/virt.c b/src/virt.c index b9da68e7..e5a87253 100644 --- a/src/virt.c +++ b/src/virt.c @@ -686,8 +686,8 @@ refresh_lists (void) 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; } @@ -833,7 +833,7 @@ refresh_lists (void) } static void -free_domains () +free_domains (void) { int i; @@ -866,7 +866,7 @@ add_domain (virDomainPtr dom) } static void -free_block_devices () +free_block_devices (void) { int i; @@ -906,7 +906,7 @@ add_block_device (virDomainPtr dom, const char *path) } static void -free_interface_devices () +free_interface_devices (void) { int i;