summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKinsey Moore <kinsey.moore@oarcorp.com>2024-01-16 18:46:06 -0600
committerJoel Sherrill <joel@rtems.org>2024-01-22 09:56:40 -0600
commit572c95c375fa043be3829ac653294070f75b0670 (patch)
treefc07e40a788801a66a16f34b1046e2f05af5ee81
parentcpukit/libmisc: Cast getpid() before shifting (diff)
downloadrtems-572c95c375fa043be3829ac653294070f75b0670.tar.bz2
cpukit/dosfs: Simplify expressions where possible
-rw-r--r--cpukit/libfs/src/dosfs/fat_fat_operations.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cpukit/libfs/src/dosfs/fat_fat_operations.c b/cpukit/libfs/src/dosfs/fat_fat_operations.c
index 1d94beb26a..fe6bbf03ce 100644
--- a/cpukit/libfs/src/dosfs/fat_fat_operations.c
+++ b/cpukit/libfs/src/dosfs/fat_fat_operations.c
@@ -356,7 +356,7 @@ fat_set_fat_cluster(
if (rc != RC_OK)
return rc;
- *sec_buf &= 0x00;
+ *sec_buf = 0x00;
*sec_buf |= (uint8_t)((fat16_clv & 0xFF00)>>8);
@@ -364,7 +364,7 @@ fat_set_fat_cluster(
}
else
{
- *(sec_buf + ofs + 1) &= 0x00;
+ *(sec_buf + ofs + 1) = 0x00;
*(sec_buf + ofs + 1) |= (uint8_t )((fat16_clv & 0xFF00)>>8);
}
@@ -372,7 +372,7 @@ fat_set_fat_cluster(
else
{
fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK;
- *(sec_buf + ofs) &= 0x00;
+ *(sec_buf + ofs) = 0x00;
*(sec_buf + ofs) |= (uint8_t)(fat16_clv & 0x00FF);