[rtems commit] flashdisk: swap arguments to checksum helper

Gedare Bloom gedare at rtems.org
Thu Sep 5 19:07:53 UTC 2013


Module:    rtems
Branch:    master
Commit:    74d357513fc8b29d2bd7d67f8223e6ab5d118c73
Changeset: http://git.rtems.org/rtems/commit/?id=74d357513fc8b29d2bd7d67f8223e6ab5d118c73

Author:    Gedare Bloom <gedare at rtems.org>
Date:      Thu Sep  5 14:31:14 2013 -0400

flashdisk:  swap arguments to checksum helper

The arguments to rtems_fdisk_calc_crc16() are reversed when called from
rtems_fdisk_page_checksum().

26052 Operands don't affect result

---

 cpukit/libblock/src/flashdisk.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/cpukit/libblock/src/flashdisk.c b/cpukit/libblock/src/flashdisk.c
index 9580dde..541c73e 100644
--- a/cpukit/libblock/src/flashdisk.c
+++ b/cpukit/libblock/src/flashdisk.c
@@ -1057,7 +1057,7 @@ rtems_fdisk_page_checksum (const uint8_t* buffer, uint32_t page_size)
   uint32_t i;
 
   for (i = 0; i < page_size; i++, buffer++)
-    cs = rtems_fdisk_calc_crc16 (cs, *buffer);
+    cs = rtems_fdisk_calc_crc16 (*buffer, cs);
 
   return cs;
 }




More information about the vc mailing list