From: Ruben Kerkhof Date: Sat, 16 Apr 2016 11:54:16 +0000 (+0200) Subject: virt plugin: compare pointer to NULL, not 0 X-Git-Tag: collectd-5.6.0~341 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=602f0dfcbf955e81bf28b606706ffde08753340e;p=collectd.git virt plugin: compare pointer to NULL, not 0 Found with coccinelle --- diff --git a/src/virt.c b/src/virt.c index bbf5afc7..e5a87253 100644 --- a/src/virt.c +++ b/src/virt.c @@ -687,7 +687,7 @@ refresh_lists (void) /* Get list of domains. */ domids = malloc (sizeof (*domids) * n); - if (domids == 0) { + if (domids == NULL) { ERROR (PLUGIN_NAME " plugin: malloc failed."); return -1; }