[rtems commit] cpukit/dosfs: Simplify expressions where possible
Joel Sherrill
joel at rtems.org
Mon Jan 22 15:56:44 UTC 2024
Module: rtems
Branch: master
Commit: 572c95c375fa043be3829ac653294070f75b0670
Changeset: http://git.rtems.org/rtems/commit/?id=572c95c375fa043be3829ac653294070f75b0670
Author: Kinsey Moore <kinsey.moore at oarcorp.com>
Date: Tue Jan 16 18:46:06 2024 -0600
cpukit/dosfs: Simplify expressions where possible
---
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);
More information about the vc
mailing list