[PATCH] cpukit/dosfs: Simplify expressions where possible
Kinsey Moore
kinsey.moore at oarcorp.com
Wed Jan 17 00:50:51 UTC 2024
---
cpukit/libfs/src/dosfs/fat_fat_operations.c | 6 +++---
1 file 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);
--
2.39.2
More information about the devel
mailing list