addr_mksocket(): fix wrong return value on error