* [PATCH] smb: client: Simplify a boolean value determination in sid_to_id()
@ 2025-10-10 19:46 Markus Elfring
0 siblings, 0 replies; only message in thread
From: Markus Elfring @ 2025-10-10 19:46 UTC (permalink / raw)
To: linux-cifs, samba-technical, Bharath SM, Jeff Layton,
Paulo Alcantara, Pavel Shilovsky, Ronnie Sahlberg,
Shirish Pargaonkar, Shyam Prasad N, Steve French, Tom Talpey
Cc: LKML, kernel-janitors
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2025-10-10 19:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-10 19:46 [PATCH] smb: client: Simplify a boolean value determination in sid_to_id() Markus Elfring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).