]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libcli/security: simplify get_ace_object_type()
authorStefan Metzmacher <metze@samba.org>
Wed, 16 Jan 2013 09:05:56 +0000 (10:05 +0100)
committerStefan Metzmacher <metze@samba.org>
Mon, 21 Jan 2013 15:12:45 +0000 (16:12 +0100)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
libcli/security/access_check.c

index 3be322ef212ece36148f22b22a2a1d1036031e00..83b7f9bd6cb07509194c759e727fb4ede4d3f587 100644 (file)
@@ -367,15 +367,11 @@ NTSTATUS se_file_access_check(const struct security_descriptor *sd,
 
 static const struct GUID *get_ace_object_type(struct security_ace *ace)
 {
-       struct GUID *type;
-
-       if (ace->object.object.flags & SEC_ACE_OBJECT_TYPE_PRESENT)
-               type = &ace->object.object.type.type;
-       else
-               type = NULL;
-
-       return type;
+       if (ace->object.object.flags & SEC_ACE_OBJECT_TYPE_PRESENT) {
+               return &ace->object.object.type.type;
+       }
 
+       return NULL;
 }
 
 /* modified access check for the purposes of DS security