X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fbind.c;h=b77a6418b9f94dfde0acbe4decf78c21aca45e52;hb=849f5394cce97a76da080f6cd9e5194b7f4ee0f0;hp=990e2ca7de4d0a17cc2c3c3ee25f8434d14c9e88;hpb=7f38ca96e3a54a4b02475f857c7d79c6a1257ada;p=collectd.git diff --git a/src/bind.c b/src/bind.c index 990e2ca7..b77a6418 100644 --- a/src/bind.c +++ b/src/bind.c @@ -440,18 +440,14 @@ static int bind_xml_read_timestamp(const char *xpath_expression, /* {{{ */ #if HAVE_TIMEGM time_t t = timegm(&tm); if (t == ((time_t)-1)) { - char errbuf[1024]; - ERROR("bind plugin: timegm() failed: %s", - sstrerror(errno, errbuf, sizeof(errbuf))); + ERROR("bind plugin: timegm() failed: %s", STRERRNO); return -1; } *ret_value = t; #else time_t t = mktime(&tm); if (t == ((time_t)-1)) { - char errbuf[1024]; - ERROR("bind plugin: mktime() failed: %s", - sstrerror(errno, errbuf, sizeof(errbuf))); + ERROR("bind plugin: mktime() failed: %s", STRERRNO); return -1; } /* mktime assumes that tm is local time. Luckily, it also sets timezone to