Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ca7fc7e9 authored by Dan Streetman's avatar Dan Streetman Committed by Herbert Xu
Browse files

lib: correct 842 decompress for 32 bit



Avoid 64 bit mod operation, which won't work on 32 bit systems.
Simple subtraction can be used instead in this case.

Reported-By: default avatarFengguang Wu <fengguang.wu@intel.com>
Signed-off-by: default avatarDan Streetman <ddstreet@ieee.org>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 42e8b0d7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -185,7 +185,7 @@ static int __do_index(struct sw842_param *p, u8 size, u8 bits, u64 fsize)
		/* this is where the current fifo is */
		u64 section = round_down(total, fsize);
		/* the current pos in the fifo */
		u64 pos = total % fsize;
		u64 pos = total - section;

		/* if the offset is past/at the pos, we need to
		 * go back to the last fifo section