file_systems/fat: Fix duplicateExpression

Pointed out by cppcheck

Change-Id: I21314d0724fd1b7ae74c575197aa3b50fb75db55
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7256
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
Murai Takashi
2023-12-28 17:40:02 +00:00
committed by waddlesplash
parent 8a0910dd49
commit 963681995c
+1 -1
View File
@@ -687,7 +687,7 @@ dosfs_mkdir(fs_volume *_vol, fs_vnode *_dir, const char *name, int perms)
}
dummy.end_cluster = dummy.cluster;
dummy.mode = FAT_SUBDIR;
if (!(perms & (S_IWUSR | S_IWGRP | S_IWGRP))) {
if (!(perms & (S_IWUSR | S_IWGRP | S_IWOTH))) {
dummy.mode |= FAT_READ_ONLY;
}
dummy.st_size = vol->bytes_per_sector*vol->sectors_per_cluster;