projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a1f9780
)
virt plugin: compare pointer to NULL, not 0
author
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Sat, 16 Apr 2016 11:54:16 +0000
(13:54 +0200)
committer
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Sat, 16 Apr 2016 11:59:47 +0000
(13:59 +0200)
Found with coccinelle
src/virt.c
patch
|
blob
|
history
diff --git
a/src/virt.c
b/src/virt.c
index
bbf5afc
..
e5a8725
100644
(file)
--- 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;
}