Rearrange how the open flags are defined so as to make Coverity happy
about it.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15897
Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Mon Sep 15 15:44:38 UTC 2025 on atb-devel-224
struct connection_struct *conn = dirfsp->conn;
struct files_struct *fsp = NULL;
struct smb_filename *full_fname = NULL;
- struct vfs_open_how how = {
- .flags = O_RDONLY | O_NONBLOCK | O_NOFOLLOW,
- };
+ struct vfs_open_how how = { .flags = O_NOFOLLOW, };
struct smb_filename *dot = NULL;
NTSTATUS status;
int fd;
#endif
#ifdef O_PATH
- how.flags = O_PATH;
+ how.flags |= O_PATH;
+#else
+ how.flags |= (O_RDONLY | O_NONBLOCK);
#endif
dot = synthetic_smb_fname(mem_ctx, ".", NULL, NULL, 0, flags);