diff mbox

[11/13] tools: removed a cpu_to_be64() in CRC calculation

Message ID 1465979400-2964-12-git-send-email-adrian@lisas.de
State Accepted
Headers show

Commit Message

Adrian Reber June 15, 2016, 8:29 a.m. UTC
An unnecessary (and wrong) cpu_to_be64() in the CRC test
produced a CRC error during "-d". Removing it fixes it
on little and big endian.

(cherry picked from commit f2aa0523c887ce970284167d776975aa77401f14)

Cherry picked from https://lisas.de/~adrian/slof/slof.git/

Signed-off-by: Adrian Reber <adrian@lisas.de>
---
 tools/sloffs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/tools/sloffs.c b/tools/sloffs.c
index b8faaae..b416b58 100644
--- a/tools/sloffs.c
+++ b/tools/sloffs.c
@@ -276,7 +276,7 @@  check_image_crc(const int fd, uint64_t len)
 		read_bytes += i;
 		if (read_bytes > len)
 			i -= read_bytes - len;
-		crc = calCRCword(buffer, i, cpu_to_be64(crc));
+		crc = calCRCword(buffer, i, crc);
 	}
 	return crc;
 }