X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fwrite_prometheus.c;h=26b0b4d4eb93f6193bade94adfd560d1290a69a4;hb=34119a09da2caa377c6b7111b1e3e0ab01058a69;hp=7c4e59e79472014b63ce862f7ec175e9287f05e4;hpb=1159cb5d383c55a80a0db100b8f7aadcf44740a5;p=collectd.git diff --git a/src/write_prometheus.c b/src/write_prometheus.c index 7c4e59e7..26b0b4d4 100644 --- a/src/write_prometheus.c +++ b/src/write_prometheus.c @@ -59,7 +59,7 @@ static struct MHD_Daemon *httpd; static cdtime_t staleness_delta = PROMETHEUS_DEFAULT_STALENESS_DELTA; -/* Unfortunately, protoc-c doesn't export it's implementation of varint, so we +/* Unfortunately, protoc-c doesn't export its implementation of varint, so we * need to implement our own. */ static size_t varint(uint8_t buffer[static VARINT_UINT32_BYTES], uint32_t value) { @@ -766,9 +766,8 @@ static int prom_open_socket(int addrfamily) { int tmp = 1; if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &tmp, sizeof(tmp)) != 0) { - char errbuf[1024]; WARNING("write_prometheus: setsockopt(SO_REUSEADDR) failed: %s", - sstrerror(errno, errbuf, sizeof(errbuf))); + STRERRNO); close(fd); fd = -1; continue;