winbind: Move variable declarations close to their use
authorVolker Lendecke <vl@samba.org>
Thu, 3 May 2018 09:48:45 +0000 (11:48 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 24 Jul 2018 21:31:43 +0000 (23:31 +0200)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Jul 24 23:31:43 CEST 2018 on sn-devel-144

source3/winbindd/winbindd.c

index 254d93b344ddbe76b40372c22de9edc03a527fd5..5e273762ff14d451d0d42aba40705fc31a80ac20 100644 (file)
@@ -1084,9 +1084,6 @@ static void winbind_client_processed(struct tevent_req *req)
 
 static void remove_client(struct winbindd_cli_state *state)
 {
-       char c = 0;
-       int nwritten;
-
        /* It's a dead client - hold a funeral */
 
        if (state == NULL) {
@@ -1113,6 +1110,9 @@ static void remove_client(struct winbindd_cli_state *state)
        TALLOC_FREE(state->io_req);
 
        if (state->sock != -1) {
+               char c = 0;
+               int nwritten;
+
                /* tell client, we are closing ... */
                nwritten = write(state->sock, &c, sizeof(c));
                if (nwritten == -1) {