smbd: Some README.Coding in smbd_do_qfilepathinfo()
authorVolker Lendecke <vl@samba.org>
Wed, 3 Jan 2024 09:34:42 +0000 (10:34 +0100)
committerJeremy Allison <jra@samba.org>
Wed, 24 Jan 2024 00:35:33 +0000 (00:35 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Jan 24 00:35:33 UTC 2024 on atb-devel-224

source3/smbd/smb2_trans2.c

index 6f272dd6c49d0b98019cf47a2cb66b8302eec757..8997c402c12ca6e0d7ee91f58c4f6daabc4201d6 100644 (file)
@@ -3115,10 +3115,11 @@ NTSTATUS smbd_do_qfilepathinfo(connection_struct *conn,
        }
 
        p = strrchr_m(smb_fname->base_name,'/');
-       if (!p)
+       if (p == NULL) {
                base_name = smb_fname->base_name;
-       else
+       } else {
                base_name = p+1;
+       }
 
        /* NT expects the name to be in an exact form of the *full*
           filename. See the trans2 torture test */