X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fcontextswitch.c;h=35ac5a397b03b1a095ac6199d5af48096546f0eb;hp=461fb0a9da502b808348e14f32360fe19cce854c;hb=a9e50e9e30ecde17e167e271060c8183bfcbf407;hpb=1ecde57a53fc7c50e6b0139ad745b868413d420c 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; }