]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Make smb_set_file_unix_basic() slightly easier to read
authorVolker Lendecke <vl@samba.org>
Sun, 22 Mar 2026 16:14:49 +0000 (17:14 +0100)
committerAnoop C S <anoopcs@samba.org>
Fri, 26 Jun 2026 11:45:20 +0000 (11:45 +0000)
Having set_owner/set_grp on the same side of the "!=" makes it easier
for the eye to parse.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Fri Jun 26 11:45:20 UTC 2026 on atb-devel-224

source3/smbd/smb1_trans2.c

index f86a7b790350f514f386f87bed2c149069161d53..02223e6b36e6342655c0856881cdd53254b7ea78 100644 (file)
@@ -4016,7 +4016,7 @@ static NTSTATUS smb_set_file_unix_basic(connection_struct *conn,
         */
 
        if ((set_owner != (uid_t)SMB_UID_NO_CHANGE) &&
-           (sbuf.st_ex_uid != set_owner)) {
+           (set_owner != sbuf.st_ex_uid)) {
                int ret;
 
                DBG_DEBUG("SMB_SET_FILE_UNIX_BASIC "
@@ -4049,7 +4049,7 @@ static NTSTATUS smb_set_file_unix_basic(connection_struct *conn,
         */
 
        if ((set_grp != (uid_t)SMB_GID_NO_CHANGE) &&
-           (sbuf.st_ex_gid != set_grp)) {
+           (set_grp != sbuf.st_ex_gid)) {
                int ret;
 
                DBG_DEBUG("SMB_SET_FILE_UNIX_BASIC "