Fix errors related to signed/unsigned comparisons
Fix errors related to signed/unsigned comparisons

On MSP430 where uint16_t is the native size, relative comparison between
signed and unsigned casts the signed value to unsigned, resulting in
incorrect re-use of a slot that was allocated.  When comparison with a
signed value cast the unsigned value to signed.

pabigot/fragpool,pabigot/fragpool