Eliminated comparison between signed integer and unsigned integer.
Replaced LONG_LONG_MAX with ~uint64_t() for uint64_t's max value.