idmap: use UL for bitshift literals
authorTony Espy <espy@canonical.com>
Wed, 5 Mar 2014 00:01:34 +0000 (19:01 -0500)
committerDenis Kenzior <denkenz@gmail.com>
Wed, 5 Mar 2014 14:49:50 +0000 (08:49 -0600)
commit201d34b0a11b1c12034f5de3e4da3cfd667ceeae
treee73dd77805e6acb074a079df712d0d11e0f3a7bc
parent76a7f9014d4d59228a55d2d885e7002d8b36b76d
idmap: use UL for bitshift literals

The current bitshift logic in idmap incorrectly uses
the literal 1 for the value to shift in idmap_alloc(),
idmap_take(), and idmap_alloc_next().  This causes the
resulting value to be an int instead of a long, which
results in the wrong bit being set once the number of
bits to shift operand exceeds sizeof(int).  Also
on some platforms, the behavior of the left bitshift
operator is undefined when this overflow occurs.
src/idmap.c