if (ptr->family != NULL && strlen (ptr->family) > 0)
if (ptr->family != NULL && ptr->family[0] != '\0')
nis_print_directory (const directory_obj *dir){  nis_server *sptr;  unsigned int i;  printf (_("Name : '%s'\n"), dir->do_name);  printf (_("Type : %s\n"), nis_nstype2str (dir->do_type));  sptr = dir->do_servers.do_servers_val;  for (i = 0; i < dir->do_servers.do_servers_len; i++)    {      if (i == 0)	fputs (_("Master Server :\n"), stdout);      else	fputs (_("Replicate :\n"), stdout);      printf (_("\tName       : %s\n"), sptr->name);      fputs (_("\tPublic Key : "), stdout);      switch (sptr->key_type)	{	case NIS_PK_NONE:	  fputs (_("None.\n"), stdout);	  break;	case NIS_PK_DH:	  printf (_("Diffie-Hellmann (%d bits)\n"),		  (sptr->pkey.n_len - 1) * 4);	  /* sptr->pkey.n_len counts the last 0, too */	  break;	case NIS_PK_RSA:	  printf (_("RSA (%d bits)\n"), (sptr->pkey.n_len - 1) * 4);	  break;	case NIS_PK_KERB:	  fputs (_("Kerberos.\n"), stdout);	  break;	default:	  printf (_("Unknown (type = %d, bits = %d)\n"), sptr->key_type,		  (sptr->pkey.n_len - 1) * 4);	  break;	}      if (sptr->ep.ep_len != 0)	{	  unsigned int j;	  endpoint *ptr;	  ptr = sptr->ep.ep_val;	  printf (_("\tUniversal addresses (%u)\n"), sptr->ep.ep_len);	  for (j = 0; j < sptr->ep.ep_len; j++)	    {	      printf ("\t[%d] - ", j + 1);	      if (ptr->proto != NULL && strlen (ptr->proto) > 0)		printf ("%s, ", ptr->proto);	      else		printf ("-, ");	      if (ptr->family != NULL && strlen (ptr->family) > 0)		printf ("%s, ", ptr->family);	      else		printf ("-, ");	      if (ptr->uaddr != NULL && strlen (ptr->uaddr) > 0)		printf ("%s\n", ptr->uaddr);	      else		fputs ("-\n", stdout);	      ptr++;	    }	}      sptr++;    }  fputs (_("Time to live : "), stdout);  print_ttl (dir->do_ttl);  fputs (_("Default Access rights :\n"), stdout);  if (dir->do_armask.do_armask_len != 0)    {      oar_mask *ptr;      ptr = dir->do_armask.do_armask_val;      for (i = 0; i < dir->do_armask.do_armask_len; i++)	{	  nis_print_rights (ptr->oa_rights);	  printf (_("\tType         : %s\n"), nis_nstype2str (ptr->oa_otype));	  fputs (_("\tAccess rights: "), stdout);	  nis_print_rights (ptr->oa_rights);	  fputs ("\n", stdout);	  ptr++;	}    }}