s3-auth: Make is_null_sid() check easier to read.
authorSimo Sorce <idra@samba.org>
Fri, 28 Feb 2014 15:57:23 +0000 (16:57 +0100)
committerGünther Deschner <gd@samba.org>
Thu, 13 Mar 2014 14:08:26 +0000 (15:08 +0100)
Signed-off-by: Simo Sorce <idra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
source3/auth/server_info.c

index 43711d5bc0eef9e6f16b92f4a4262dc09ed99663..c363f444d90f51536389a393405f4fc381846ee4 100644 (file)
@@ -453,6 +453,7 @@ NTSTATUS passwd_to_SamInfo3(TALLOC_CTX *mem_ctx,
        enum lsa_SidType type;
        uint32_t num_sids = 0;
        struct dom_sid *user_sids = NULL;
+       bool is_null;
        bool ok;
 
        tmp_ctx = talloc_stackframe();
@@ -514,8 +515,8 @@ NTSTATUS passwd_to_SamInfo3(TALLOC_CTX *mem_ctx,
        }
 
        /* Make sure we have a valid group sid */
-       ok = !is_null_sid(&group_sid);
-       if (!ok) {
+       is_null = is_null_sid(&group_sid);
+       if (is_null) {
                status = NT_STATUS_NO_SUCH_USER;
                goto done;
        }