smb: client: Simplify a boolean value determination in sid_to_id()
Subsystems (3)
PATCH 1/1 smb: client: Simplify a boolean value determination in sid_to_id()
From: Markus Elfring <[email protected]>
Date: Fri, 10 Oct 2025 21:37:59 +0200
Use the result of a condition check directly for the initialisation of the local variable “is_group” instead of assignment statements from if/else branches.
Signed-off-by Markus Elfring <[email protected]>
--- fs/smb/client/cifsacl.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
fs/smb/client/cifsacl.c +1 -6
@@ -359,12 +359,7 @@ sid_to_id(struct cifs_sb_info *cifs_sb, struct smb_sid *psid,if ((cifs_sb->mnt_cifs_flags &CIFS_MOUNT_UID_FROM_ACL ) || (cifs_sb_master_tcon (cifs_sb)->posix_extensions)) {uint32_t unix_id; -bool is_group; - -if (sidtype !=SIDOWNER ) - is_group = true; -else - is_group = false; +bool is_group = sidtype !=SIDOWNER ;if (is_well_known_sid (psid, &unix_id, is_group) == false) goto try_upcall_to_get_id;
Signature · 1 line
2.51.0