Actually use uint16_t for ports instead of int. (My previous commit forgot to change the one place that actually mattered.)