Skip to content

Commit f65fadb

Browse files
Lu HongfeiSteve French
authored andcommitted
ksmbd: Replace the ternary conditional operator with min()
It would be better to replace the traditional ternary conditional operator with min() in compare_sids. Signed-off-by: Lu Hongfei <[email protected]> Acked-by: Namjae Jeon <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent 81a94b2 commit f65fadb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/smb/server/smbacl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ int compare_sids(const struct smb_sid *ctsid, const struct smb_sid *cwsid)
9797
/* compare all of the subauth values if any */
9898
num_sat = ctsid->num_subauth;
9999
num_saw = cwsid->num_subauth;
100-
num_subauth = num_sat < num_saw ? num_sat : num_saw;
100+
num_subauth = min(num_sat, num_saw);
101101
if (num_subauth) {
102102
for (i = 0; i < num_subauth; ++i) {
103103
if (ctsid->sub_auth[i] != cwsid->sub_auth[i]) {

0 commit comments

Comments
 (0)