#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; \
}
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);