xbzrle.c: Avoid undefined behaviour with signed arithmetic
commit968fc24d843c9e9b24231ca1960b47ef2fc724ea
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 28 Mar 2014 15:12:57 +0000 (28 15:12 +0000)
committerMichael Tokarev <mjt@tls.msk.ru>
Fri, 18 Apr 2014 06:33:36 +0000 (18 10:33 +0400)
tree91aa8106991d263be7f484064db73b41c89c6772
parent423d00c857ebc814ef6b5fc63f1d6c595cdc005d
xbzrle.c: Avoid undefined behaviour with signed arithmetic

Use unsigned types for doing bitwise arithmetic in the xzbrle
calculations, to avoid undefined behaviour:

 xbzrle.c:99:49: runtime error: left shift of 72340172838076673
 by 7 places cannot be represented in type 'long'

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
xbzrle.c