The previous commit fixed a signed/unsigned warning but, on 32-bit systems, long is only 32 bits, so the fix was incorrect there. Change-Id: I6afe340164de0e176c7f710fcdd095b2a4cddee4