*size *= 2;
*size = newsize;
_nss_hesiod_initgroups_dyn (const char *user, gid_t group, long int *start,			    long int *size, gid_t **groupsp, int *errnop){  enum nss_status status = NSS_STATUS_SUCCESS;  char **list = NULL;  char *p;  void *context;  gid_t *groups = *groupsp;  context = _nss_hesiod_init ();  if (context == NULL)    return NSS_STATUS_UNAVAIL;  list = hesiod_resolve (context, user, "grplist");  if (list == NULL)    {      hesiod_end (context);      return errno == ENOENT ? NSS_STATUS_NOTFOUND : NSS_STATUS_UNAVAIL;    }  if (!internal_gid_in_list (groups, group, *start))    {      if (__builtin_expect (*start == *size, 0))	{	  /* Need a bigger buffer.  */	  gid_t *newgroups;	  newgroups = realloc (groups, 2 * *size * sizeof (*groups));	  if (newgroups == NULL)	    goto done;	  *groupsp = groups = newgroups;	  *size *= 2;	}      groups[(*start)++] = group;    }  p = *list;  while (*p != '\0')    {      char *endp;      char *q;      long int val;      status = NSS_STATUS_NOTFOUND;      q = p;      while (*q != '\0' && *q != ':')	++q;      if (*q != '\0')	*q++ = '\0';      val = strtol (p, &endp, 10);      if (sizeof (gid_t) == sizeof (long int) || (gid_t) val == val)	{	  if (*endp == '\0' && endp != p)	    status = NSS_STATUS_SUCCESS;	  else	    status = internal_gid_from_group (context, p, &group);	  if (status == NSS_STATUS_SUCCESS	      && !internal_gid_in_list (groups, group, *start))	    {	      if (__builtin_expect (*start == *size, 0))		{		  /* Need a bigger buffer.  */		  gid_t *newgroups;		  newgroups = realloc (groups, 2 * *size * sizeof (*groups));		  if (newgroups == NULL)		    goto done;		  *groupsp = groups = newgroups;		  *size *= 2;		}	      groups[(*start)++] = group;	    }	}      p = q;    } done:  hesiod_free_list (context, list);  hesiod_end (context);  return NSS_STATUS_SUCCESS;}