diff options
author | Lu Hongfei <luhongfei@vivo.com> | 2023-06-09 08:06:36 +0300 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2023-06-26 08:07:04 +0300 |
commit | f65fadb0422537d73f9a6472861852dc2f7a6a5b (patch) | |
tree | 79560228477a4af85cf991478fa170b6febf2647 /fs/smb/server | |
parent | 81a94b27847f7d2e499415db14dd9dc7c22b19b0 (diff) | |
download | linux-f65fadb0422537d73f9a6472861852dc2f7a6a5b.tar.xz |
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 <luhongfei@vivo.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/smb/server')
-rw-r--r-- | fs/smb/server/smbacl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/smb/server/smbacl.c b/fs/smb/server/smbacl.c index ad919a4239d0..e5e438bf5499 100644 --- a/fs/smb/server/smbacl.c +++ b/fs/smb/server/smbacl.c @@ -97,7 +97,7 @@ int compare_sids(const struct smb_sid *ctsid, const struct smb_sid *cwsid) /* compare all of the subauth values if any */ num_sat = ctsid->num_subauth; num_saw = cwsid->num_subauth; - num_subauth = num_sat < num_saw ? num_sat : num_saw; + num_subauth = min(num_sat, num_saw); if (num_subauth) { for (i = 0; i < num_subauth; ++i) { if (ctsid->sub_auth[i] != cwsid->sub_auth[i]) { |