X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Futils_cmd_getthreshold.c;h=c1f3f562ca4c924b7794759fc505e72664e24e3f;hp=78f9a75ab0b0c1da92f40b295ec6d751ff1c2573;hb=a9e50e9e30ecde17e167e271060c8183bfcbf407;hpb=307c875e5a78a2729fbbe1a588d232e9a129d75a diff --git a/src/utils_cmd_getthreshold.c b/src/utils_cmd_getthreshold.c index 78f9a75a..c1f3f562 100644 --- a/src/utils_cmd_getthreshold.c +++ b/src/utils_cmd_getthreshold.c @@ -36,9 +36,8 @@ #define print_to_socket(fh, ...) \ if (fprintf(fh, __VA_ARGS__) < 0) { \ - char errbuf[1024]; \ WARNING("handle_getthreshold: failed to write to socket #%i: %s", \ - fileno(fh), sstrerror(errno, errbuf, sizeof(errbuf))); \ + fileno(fh), STRERRNO); \ return -1; \ } @@ -152,7 +151,7 @@ int handle_getthreshold(FILE *fh, char *buffer) { i++; /* Print the response */ - print_to_socket(fh, "%zu Threshold found\n", i); + print_to_socket(fh, "%" PRIsz " Threshold found\n", i); if (threshold.host[0] != 0) print_to_socket(fh, "Host: %s\n", threshold.host);