summaryrefslogtreecommitdiffstats
path: root/lib/checksum.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/checksum.c')
-rw-r--r--lib/checksum.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/checksum.c b/lib/checksum.c
index b08c2d059024..097508732f34 100644
--- a/lib/checksum.c
+++ b/lib/checksum.c
@@ -57,9 +57,9 @@ static unsigned int do_csum(const unsigned char *buff, int len)
odd = 1 & (unsigned long) buff;
if (odd) {
#ifdef __LITTLE_ENDIAN
- result = *buff;
-#else
result += (*buff << 8);
+#else
+ result = *buff;
#endif
len--;
buff++;
OpenPOWER on IntegriCloud