Lines Matching defs:newaddr
77 static int check_ipaddr(char *addr, char **newaddr);
501 * *newaddr will point to the new address.
510 check_ipaddr(char *addr, char **newaddr) {
516 if (newaddr == NULL)
523 if ((*newaddr = calloc(1, INET_ADDRSTRLEN)) == NULL) {
528 if (inet_ntop(AF_INET, &addr_ipv4, *newaddr,
531 free(*newaddr);
536 if ((*newaddr = calloc(1, INET6_ADDRSTRLEN)) == NULL) {
540 if (inet_ntop(AF_INET6, &addr_ipv6, *newaddr, INET6_ADDRSTRLEN))
542 free(*newaddr);
548 if (newaddr == NULL)
550 if ((*newaddr = calloc(1, INET_ADDRSTRLEN)) == NULL) {
554 if (inet_ntop(AF_INET, &addr_ipv4, *newaddr, INET_ADDRSTRLEN))
556 free(*newaddr);
562 if (newaddr == NULL)
564 if ((*newaddr = strdup(addr)) == NULL) {