From f312f7e7e076f864d836ff3f8fee8d8183073fac Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 19 Dec 2008 12:05:19 -0800 Subject: [PATCH] Fix a "ignoring function call result" warning (cherry picked from commit bb168470676a610cd77cde196260611a49ddf5d1) --- source/winbindd/winbindd.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/winbindd/winbindd.c b/source/winbindd/winbindd.c index b843ac0cec7..bf2937cff80 100644 --- a/source/winbindd/winbindd.c +++ b/source/winbindd/winbindd.c @@ -729,6 +729,7 @@ static void new_connection(int listen_sock, bool privileged) static void remove_client(struct winbindd_cli_state *state) { char c = 0; + int nwritten; /* It's a dead client - hold a funeral */ @@ -737,7 +738,11 @@ static void remove_client(struct winbindd_cli_state *state) } /* tell client, we are closing ... */ - write(state->sock, &c, sizeof(c)); + nwritten = write(state->sock, &c, sizeof(c)); + if (nwritten == -1) { + DEBUG(2, ("final write to client failed: %s\n", + strerror(errno))); + } /* Close socket */ -- 2.11.4.GIT