X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fcontextswitch.c;h=35ac5a397b03b1a095ac6199d5af48096546f0eb;hb=711f5b6c86f51061c21bedcaa46214a01de0125c;hp=461fb0a9da502b808348e14f32360fe19cce854c;hpb=9655d4a6d9fa2c4f02032759b831e93933d68bd9;p=collectd.git diff --git a/src/contextswitch.c b/src/contextswitch.c index 461fb0a9..35ac5a39 100644 --- a/src/contextswitch.c +++ b/src/contextswitch.c @@ -85,8 +85,7 @@ static int cs_read(void) { fh = fopen("/proc/stat", "r"); if (fh == NULL) { - ERROR("contextswitch plugin: unable to open /proc/stat: %s", - sstrerror(errno, buffer, sizeof(buffer))); + ERROR("contextswitch plugin: unable to open /proc/stat: %s", STRERRNO); return -1; } @@ -126,9 +125,7 @@ static int cs_read(void) { status = perfstat_cpu_total(NULL, &perfcputotal, sizeof(perfstat_cpu_total_t), 1); if (status < 0) { - char errbuf[1024]; - ERROR("contextswitch plugin: perfstat_cpu_total: %s", - sstrerror(errno, errbuf, sizeof(errbuf))); + ERROR("contextswitch plugin: perfstat_cpu_total: %s", STRERRNO); return -1; }