Code

liboconfig/oconfig.c: remove unneeded assigment
[collectd.git] / src / virt.c
index 79d46826997d2222590839769137a0ea28155c34..e5a8725381d2cf56a7e3e4ea01ddff6481276d82 100644 (file)
@@ -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;
         }