lib/util: Reduce sum variable to uint8_t