linux: more idiomatic array operations on GetPortLists