From: Markus Elfring <elfring@users.sourceforge.net>
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 <elfring@users.sourceforge.net>
---
fs/smb/client/cifsacl.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/fs/smb/client/cifsacl.c b/fs/smb/client/cifsacl.c
index 63b3b1290bed..2fd7841fdc8a 100644
--- a/fs/smb/client/cifsacl.c
+++ b/fs/smb/client/cifsacl.c
@@ -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;
--
2.51.0