Use uint32_t instead int in comparisons

Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>