From ea2faf788394aceaf8e62e6ae210e3ff2fe34ffb Mon Sep 17 00:00:00 2001 From: Avi Date: Wed, 15 Feb 2023 17:46:57 +1000 Subject: [PATCH] Fix #1107, Remove dead branch (superfluous if condition) --- .github/workflows/standalone-build.yml | 2 +- src/os/shared/src/osapi-filesys.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/standalone-build.yml b/.github/workflows/standalone-build.yml index c66564a8b..d186a25e8 100644 --- a/.github/workflows/standalone-build.yml +++ b/.github/workflows/standalone-build.yml @@ -10,7 +10,7 @@ defaults: env: allowed_ncov_lines: 0 - allowed_ncov_branches: 4 + allowed_ncov_branches: 2 allowed_ncov_functions: 0 jobs: diff --git a/src/os/shared/src/osapi-filesys.c b/src/os/shared/src/osapi-filesys.c index 74fe269a4..3817f5a9c 100644 --- a/src/os/shared/src/osapi-filesys.c +++ b/src/os/shared/src/osapi-filesys.c @@ -172,9 +172,8 @@ int32 OS_FileSys_Initialize(char *address, const char *fsdevname, const char *fs * contains the string "RAM" then it is a RAM disk. Otherwise * leave the type as UNKNOWN and let the implementation decide. */ - if (filesys->fstype == OS_FILESYS_TYPE_UNKNOWN && - (filesys->address != NULL || strncmp(filesys->volume_name, OS_FILESYS_RAMDISK_VOLNAME_PREFIX, - sizeof(OS_FILESYS_RAMDISK_VOLNAME_PREFIX) - 1) == 0)) + if (filesys->address != NULL || strncmp(filesys->volume_name, OS_FILESYS_RAMDISK_VOLNAME_PREFIX, + sizeof(OS_FILESYS_RAMDISK_VOLNAME_PREFIX) - 1) == 0) { filesys->fstype = OS_FILESYS_TYPE_VOLATILE_DISK; }