rem: int i, ret;
context: bool netcat_resolvehost(nc_host_t *dst, char *name){  struct hostent *hostent;  struct in_addr res_addr;  int i, ret;  assert(name[0]);  debug_v("netcat_resolvehost(dst=%p, name=\"%s\")", (void *)dst, name);  /* reset the dst struct for debugging cleanup purposes */  memset(dst, 0, sizeof(*dst));  strcpy(dst->name, "(unknown)");  ret = netcat_inet_pton(name, &res_addr);  if (!ret) {			/* couldn't translate: it must be a name! */    /* if the opt_numeric option is set, we must not use DNS in any kind */    if (opt_numeric)      return FALSE;    /* failures to look up a name are reported to the calling function */    if (!(hostent = gethostbyname(name)))      return FALSE;    strncpy(dst->name, hostent->h_name, MAXHOSTNAMELEN - 2);    /* now save all the available ip addresses (limiting to the global MAXINETADDRS) */    for (i = 0; hostent->h_addr_list[i] && (i < MAXINETADDRS); i++) {      memcpy(&dst->iaddrs[i], hostent->h_addr_list[i], sizeof(dst->iaddrs[0]));      strncpy(dst->addrs[i], netcat_inet_ntop(&dst->iaddrs[i]),	      sizeof(dst->addrs[0]));    }				/* for x -> addrs, part A */    /* since the invalid dns warning is only shown with verbose level 1,       we can skip them (which would speed up the thing) */    if (opt_verbose < 1)      return TRUE;    /* do inverse lookups in separate loop based on our collected forward       addresses. FIXME: handle the mismatch event */    for (i = 0; dst->iaddrs[i].s_addr && (i < MAXINETADDRS); i++) {      hostent = gethostbyaddr((char *)&dst->iaddrs[i], sizeof(dst->iaddrs[0]),			      AF_INET);      if (!hostent || !hostent->h_name) {	ncprint(NCPRINT_WARNING, _("inverse host lookup failed for %s"),		dst->addrs[i]);	continue;      }      if (strcasecmp(dst->name, hostent->h_name)) {	ncprint(NCPRINT_WARNING, _("this host mismatch! %s - %s"), dst->name,		hostent->h_name);      }    }  }  else {			/* `name' is a numeric address, try reverse lookup */    memcpy(&dst->iaddrs[0], &res_addr, sizeof(dst->iaddrs[0]));    strncpy(dst->addrs[0], netcat_inet_ntop(&res_addr), sizeof(dst->addrs[0]));    /* if opt_numeric is set or we don't require verbosity, we are done */    if (opt_numeric || !opt_verbose)      return TRUE;    /* numeric or not, failure to look up a PTR is *not* considered fatal */    hostent = gethostbyaddr((char *)&res_addr, sizeof(res_addr), AF_INET);    if (!hostent)      ncprint(NCPRINT_ERROR, _("Inverse name lookup failed for `%s'"), name);    else {      strncpy(dst->name, hostent->h_name, MAXHOSTNAMELEN - 2);      /* now do the direct lookup to see if the IP was auth */      hostent = gethostbyname(dst->name);      if (!hostent || !hostent->h_addr_list[0]) {	ncprint(NCPRINT_WARNING, _("direct host lookup failed for %s"), dst->name);      }      else if (strcasecmp(dst->name, hostent->h_name)) {	ncprint(NCPRINT_WARNING, _("this host mismatch! %s - %s"), dst->name,		hostent->h_name);      }      /* FIXME: I should erase the dst->name field, since the answer wasn't auth */    }				/* if hostent */  }				/* INADDR_NONE Great Split */  return TRUE;}