1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-28 01:58:17 +03:00

debug: fix -O3 warning - unused return code of write()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
This commit is contained in:
Michael Adam 2016-03-22 23:01:10 +01:00
parent 0e80775c1b
commit af83bc3920

View File

@ -139,8 +139,12 @@ static int debug_level_to_priority(int level)
static void debug_file_log(int msg_level,
const char *msg, const char *msg_no_nl)
{
ssize_t ret;
check_log_size();
write(state.fd, msg, strlen(msg));
do {
ret = write(state.fd, msg, strlen(msg));
} while (ret == -1 && errno == EINTR);
}
#ifdef WITH_SYSLOG
@ -1114,7 +1118,10 @@ static void Debug1(const char *msg)
case DEBUG_DEFAULT_STDOUT:
case DEBUG_DEFAULT_STDERR:
if (state.fd > 0) {
write(state.fd, msg, strlen(msg));
ssize_t ret;
do {
ret = write(state.fd, msg, strlen(msg));
} while (ret == -1 && errno == EINTR);
}
break;
case DEBUG_FILE: