Don't shift signed values left.
authorGuy Harris <guy@alum.mit.edu>
Thu, 30 Apr 2015 20:39:39 +0000 (13:39 -0700)
committerGuy Harris <guy@alum.mit.edu>
Thu, 30 Apr 2015 20:40:17 +0000 (20:40 +0000)
commitd2b02eaf591145f40eaa65d6b50908e47d7c4484
tree43b7a0df4e0b7a7212bc084cd401aac1c26cfce7
parentfac11078c3b5ace9b84c1058fb44714339f91190
Don't shift signed values left.

That's not valid in C99, at least, if the value is negative or if the
shift count is the number of bits in the value - 1, and we might get
compile-time or run-time complaints about that.

Also, make bit masks unsigned; to quote a run-time error reported in

https://www.wireshark.org/lists/wireshark-dev/201504/msg00084.html

"left shift of 1 by 31 places cannot be represented in type 'int'", so
use type "unsigned int" instead, by shifting 1U rather than 1 left.

Change-Id: I62220808058cb93f83329c1916b888a2067d524c
Reviewed-on: https://code.wireshark.org/review/8254
Reviewed-by: Guy Harris <guy@alum.mit.edu>
wsutil/sign_ext.h