nis_freeresult (result);
saved_res = result;
internal_nisplus_getnetent_r (struct netent *network, char *buffer,			       size_t buflen, int *herrnop){  int parse_res;  /* Get the next entry until we found a correct one. */  do    {      if (result == NULL)	{	  if (tablename_val == NULL)	    if (_nss_create_tablename() != NSS_STATUS_SUCCESS)	      return NSS_STATUS_UNAVAIL;	  result = nis_first_entry(tablename_val);	  if (niserr2nss (result->status) != NSS_STATUS_SUCCESS)	    {	      int retval;	      retval = niserr2nss (result->status);	      if (retval == NSS_STATUS_TRYAGAIN)		{		  *herrnop = NETDB_INTERNAL;		  __set_errno (EAGAIN);		  return retval;		}	      else		return retval;	    }	}      else	{	  nis_result *res;	  res = nis_next_entry(tablename_val, &result->cookie);	  nis_freeresult (result);	  result = res;	  if (niserr2nss (result->status) != NSS_STATUS_SUCCESS)	    {	      int retval;	      retval = niserr2nss (result->status);	      if (retval == NSS_STATUS_TRYAGAIN)		{		  *herrnop = NETDB_INTERNAL;		  __set_errno (EAGAIN);		}	      return retval;	    }	}      parse_res = _nss_nisplus_parse_netent (result, network, buffer, buflen);      if (!parse_res && errno == ERANGE)        {          *herrnop = NETDB_INTERNAL;          return NSS_STATUS_TRYAGAIN;        }    } while (!parse_res);  return NSS_STATUS_SUCCESS;}