for (i = i_grouplen - 1; i >= 0; i--) { cred->groups[i] = groups[i];	 }
for (i = i_grouplen - 1; i >= 0; --i) cred->groups[i] = groups[i];
authdes_getucred (const struct authdes_cred *adc, uid_t * uid, gid_t * gid,		  short *grouplen, gid_t * groups){  unsigned sid;  register int i;  uid_t i_uid;  gid_t i_gid;  int i_grouplen;  struct bsdcred *cred;  sid = adc->adc_nickname;  if (sid >= AUTHDES_CACHESZ)    {      debug ("invalid nickname");      return 0;    }  cred = (struct bsdcred *) authdes_cache[sid].localcred;  if (cred == NULL)    {      cred = (struct bsdcred *) mem_alloc (sizeof (struct bsdcred));      authdes_cache[sid].localcred = (char *) cred;      cred->grouplen = INVALID;    }  if (cred->grouplen == INVALID)    {      /*       * not in cache: lookup       */      if (!netname2user (adc->adc_fullname.name, &i_uid, &i_gid,			 &i_grouplen, groups))	{	  debug ("unknown netname");	  cred->grouplen = UNKNOWN;	/* mark as lookup up, but not found */	  return 0;	}      debug ("missed ucred cache");      *uid = cred->uid = i_uid;      *gid = cred->gid = i_gid;      *grouplen = cred->grouplen = i_grouplen;      for (i = i_grouplen - 1; i >= 0; i--)	{	  cred->groups[i] = groups[i];	/* int to short */	}      return 1;    }  else if (cred->grouplen == UNKNOWN)    {      /*       * Already lookup up, but no match found       */      return 0;    }  /*   * cached credentials   */  *uid = cred->uid;  *gid = cred->gid;  *grouplen = cred->grouplen;  for (i = cred->grouplen - 1; i >= 0; i--)    {      groups[i] = cred->groups[i];	/* short to int */    }  return 1;}