X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fpowerdns.c;h=729a15b473dbcec0dcfbc2ca8387e5d060f08e12;hb=849f5394cce97a76da080f6cd9e5194b7f4ee0f0;hp=c71580703dfaa5eb6dcdf14c4690fcb518981c14;hpb=8abc14ed0b74a224b4c561cb86997f9e26c432de;p=collectd.git diff --git a/src/powerdns.c b/src/powerdns.c index c7158070..729a15b4 100644 --- a/src/powerdns.c +++ b/src/powerdns.c @@ -44,15 +44,12 @@ #endif #define FUNC_ERROR(func) \ do { \ - char errbuf[1024]; \ - ERROR("powerdns plugin: %s failed: %s", func, \ - sstrerror(errno, errbuf, sizeof(errbuf))); \ + ERROR("powerdns plugin: %s failed: %s", func, STRERRNO); \ } while (0) #define SOCK_ERROR(func, sockpath) \ do { \ - char errbuf[1024]; \ ERROR("powerdns plugin: Socket `%s` %s failed: %s", sockpath, func, \ - sstrerror(errno, errbuf, sizeof(errbuf))); \ + STRERRNO); \ } while (0) #define SERVER_SOCKET LOCALSTATEDIR "/run/pdns.controlsocket" @@ -355,7 +352,7 @@ static void submit(const char *plugin_instance, /* {{{ */ } if (ds->ds_num != 1) { - ERROR("powerdns plugin: type `%s' has %zu data sources, " + ERROR("powerdns plugin: type `%s' has %" PRIsz " data sources, " "but I can only handle one.", type, ds->ds_num); return;