]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Fix a "ignoring function call result" warning
authorVolker Lendecke <vl@samba.org>
Fri, 28 Nov 2008 18:53:59 +0000 (19:53 +0100)
committerVolker Lendecke <vl@samba.org>
Fri, 19 Dec 2008 12:57:32 +0000 (13:57 +0100)
source3/winbindd/winbindd.c

index 0ecf11d0e5e3f236428b5bbfcfd2b1ae73376b38..e881ab412ecafac1ca22fe1f3e950efd810e2c05 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 */