X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fcontextswitch.c;h=344f76e76f0c29242ac20821d8efb25f83f12871;hb=25b5f5c49dd50c64f41b7bf69b8e471b0ffc6f15;hp=d3e6fe63fd0ae4167106faada1df850b7ed25b49;hpb=d4195dfbd9a1616ca1349150ec2496903b690b31;p=collectd.git diff --git a/src/contextswitch.c b/src/contextswitch.c index d3e6fe63..344f76e7 100644 --- a/src/contextswitch.c +++ b/src/contextswitch.c @@ -133,7 +133,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 +142,7 @@ static int cs_read (void) } cs_submit(perfcputotal.pswitch); - return (0); + status = 0; #endif /* defined(HAVE_PERFSTAT) */ return status;