- port = strtoul(serv, &z, 0);
+ if (!*serv) return EAI_SERVICE;
+ port = strtoul(serv, &z, 10);
/* Try as a numeric address */
if (__ipparse(&sa, family, host) >= 0) {
buf = calloc(sizeof *buf, 1+EXTRA);
/* Try as a numeric address */
if (__ipparse(&sa, family, host) >= 0) {
buf = calloc(sizeof *buf, 1+EXTRA);