X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fcontextswitch.c;h=76e2a6c0b935c9225d50e96e7c2405554f459476;hb=13009ee6db333a1dc538c09fc5aafb2446db9b39;hp=d3e6fe63fd0ae4167106faada1df850b7ed25b49;hpb=d4195dfbd9a1616ca1349150ec2496903b690b31;p=collectd.git diff --git a/src/contextswitch.c b/src/contextswitch.c index d3e6fe63..76e2a6c0 100644 --- a/src/contextswitch.c +++ b/src/contextswitch.c @@ -22,6 +22,7 @@ **/ #include "collectd.h" + #include "common.h" #include "plugin.h" @@ -133,7 +134,7 @@ static int cs_read (void) perfstat_cpu_total_t perfcputotal; status = perfstat_cpu_total(NULL, &perfcputotal, sizeof(perfstat_cpu_total_t), 1); - if (status < 0); + if (status < 0) { char errbuf[1024]; ERROR ("contextswitch plugin: perfstat_cpu_total: %s", @@ -142,7 +143,7 @@ static int cs_read (void) } cs_submit(perfcputotal.pswitch); - return (0); + status = 0; #endif /* defined(HAVE_PERFSTAT) */ return status;