[test_addr.c] fix compiler warnings & simplify
small fixes to address.c

- use curly braces around if statements
- get out of get_interface_addr early if the family is not AF_INET or
  AF_INET6