grc: fixes undefined behavior in get_nports() (WIP)
grc: Rework nports code