Module: check_mk
Branch: master
Commit: 83271fbce59c9e84dfec545e13c53aee9f944eaa
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=83271fbce59c9e…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Thu Feb 4 10:20:14 2016 +0100
Fixed error message.
---
livestatus/src/unixcat.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/livestatus/src/unixcat.c b/livestatus/src/unixcat.c
index 42b194d..4e205e4 100644
--- a/livestatus/src/unixcat.c
+++ b/livestatus/src/unixcat.c
@@ -112,9 +112,10 @@ void *copy_thread(void *info) {
while (bytes_to_write > 0) {
ssize_t bytes_written = write(to, buffer, bytes_to_write);
if (bytes_written == -1) {
+ uintmax_t b = bytes_to_write;
fprintf(stderr,
- "Error: Cannot write %" PRIuMAX " bytes to %d:
%s\n",
- (uintmax_t)bytes_to_write, to, strerror(errno));
+ "Error: Cannot write %" PRIuMAX " bytes to %d:
%s\n", b,
+ to, strerror(errno));
break;
}
buffer += bytes_written;