idtree: Fix undefined behaviour (left shift of signed value)
authorDavid Gibson <david@gibson.dropbear.id.au>
Wed, 27 Jan 2016 13:17:47 +0000 (00:17 +1100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Tue, 2 Feb 2016 12:00:06 +0000 (23:00 +1100)
commit36a15d7dee063b6b8ce0480482969e4ba49460a4
tree0bf1e0d8e30b7cbece58edf1a57b761677c38715
parentfb33661a05d2e42b675f4d84718312b400ae52a4
idtree: Fix undefined behaviour (left shift of signed value)

~0 will be signed and negative on any 2s complement system, and
left shifting a negative value has undefined behaviour in C.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
ccan/idtree/idtree.c