From: Markus Elfring <Markus.Elfring@web.de>
To: linux-cifs@vger.kernel.org, samba-technical@lists.samba.org,
Bharath SM <bharathsm@microsoft.com>,
Jeff Layton <jlayton@redhat.com>,
Paulo Alcantara <pc@manguebit.org>,
Pavel Shilovsky <pshilov@microsoft.com>,
Ronnie Sahlberg <ronniesahlberg@gmail.com>,
Shirish Pargaonkar <shirishpargaonkar@gmail.com>,
Shyam Prasad N <sprasad@microsoft.com>,
Steve French <sfrench@samba.org>, Tom Talpey <tom@talpey.com>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH] smb: client: Simplify a boolean value determination in sid_to_id()
Date: Fri, 10 Oct 2025 21:46:56 +0200 [thread overview]
Message-ID: <4f2e37f8-09f7-4ba4-bd3a-bd5f62e98c52@web.de> (raw)
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
reply other threads:[~2025-10-10 19:47 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4f2e37f8-09f7-4ba4-bd3a-bd5f62e98c52@web.de \
--to=markus.elfring@web.de \
--cc=bharathsm@microsoft.com \
--cc=jlayton@redhat.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pc@manguebit.org \
--cc=pshilov@microsoft.com \
--cc=ronniesahlberg@gmail.com \
--cc=samba-technical@lists.samba.org \
--cc=sfrench@samba.org \
--cc=shirishpargaonkar@gmail.com \
--cc=sprasad@microsoft.com \
--cc=tom@talpey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).