ldap_server: Move a variable into a smaller scope
authorGarming Sam <garming@catalyst.net.nz>
Thu, 23 Mar 2017 23:20:19 +0000 (12:20 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 29 Mar 2017 00:37:29 +0000 (02:37 +0200)
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
source4/ldap_server/ldap_backend.c

index d20d586d237533c5e8cb8dfba8418726e9a5942b..1f0c7afdd911c7a028aaea5bd1158343c6f5def0 100644 (file)
@@ -1228,7 +1228,6 @@ NTSTATUS ldapsrv_do_call(struct ldapsrv_call *call)
        unsigned int i;
        struct ldap_message *msg = call->request;
        NTSTATUS status;
-       bool log = true;
 
        /* Check for undecoded critical extensions */
        for (i=0; msg->controls && msg->controls[i]; i++) {
@@ -1241,6 +1240,7 @@ NTSTATUS ldapsrv_do_call(struct ldapsrv_call *call)
        }
 
        if (call->conn->authz_logged == false) {
+               bool log = true;
 
                /*
                 * We do not want to log anonymous access if the query