Update connecthostport.c

Removed duplicated function in code body