]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Fix a "ignoring function call result" warning
authorVolker Lendecke <vl@samba.org>
Fri, 19 Dec 2008 20:05:19 +0000 (12:05 -0800)
committerKarolin Seeger <kseeger@samba.org>
Fri, 2 Jan 2009 11:44:21 +0000 (12:44 +0100)
(cherry picked from commit bb168470676a610cd77cde196260611a49ddf5d1)

source/winbindd/winbindd.c

index b843ac0cec776750e33d1768155be0e83846312f..bf2937cff80c33196d4d744eadbbcc03953dedfc 100644 (file)
@@ -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 */