X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fpf.c;h=aa2a53a411eb5ccd9b83ca085bcee78668df4958;hb=61a4ed99b1a5b6d371bb745933d0efc5dff9505c;hp=82adc53b275d2b10f0a194e586d220121f9fe4a5;hpb=662c44a84ae3daecd4ffdea940fffce35a41b52a;p=collectd.git diff --git a/src/pf.c b/src/pf.c index 82adc53b..aa2a53a4 100644 --- a/src/pf.c +++ b/src/pf.c @@ -58,7 +58,7 @@ static char const *pf_scounters[SCNT_MAX + 1] = SCNT_NAMES; static char const *pf_device = "/dev/pf"; static void pf_submit(char const *type, char const *type_instance, uint64_t val, - _Bool is_gauge) { + bool is_gauge) { value_t values[1]; value_list_t vl = VALUE_LIST_INIT; @@ -83,17 +83,13 @@ static int pf_read(void) { fd = open(pf_device, O_RDONLY); if (fd < 0) { - char errbuf[1024]; - ERROR("pf plugin: Unable to open %s: %s", pf_device, - sstrerror(errno, errbuf, sizeof(errbuf))); + ERROR("pf plugin: Unable to open %s: %s", pf_device, STRERRNO); return -1; } status = ioctl(fd, DIOCGETSTATUS, &state); if (status != 0) { - char errbuf[1024]; - ERROR("pf plugin: ioctl(DIOCGETSTATUS) failed: %s", - sstrerror(errno, errbuf, sizeof(errbuf))); + ERROR("pf plugin: ioctl(DIOCGETSTATUS) failed: %s", STRERRNO); close(fd); return -1; }