regs->start = re_malloc (regoff_t, 2 * need_regs); if (BE (regs->start == NULL, 0))
regs->start = re_malloc (regoff_t, need_regs); regs->end = re_malloc (regoff_t, need_regs); if (BE (regs->start == NULL, 0) || BE (regs->end == NULL, 0))
re_copy_regs (regs, pmatch, nregs, regs_allocated)    struct re_registers *regs;    regmatch_t *pmatch;    int nregs, regs_allocated;{  int rval = REGS_REALLOCATE;  int i;  int need_regs = nregs + 1;  /* We need one extra element beyond `num_regs' for the `-1' marker GNU code     uses.  */  /* Have the register data arrays been allocated?  */  if (regs_allocated == REGS_UNALLOCATED)    { /* No.  So allocate them with malloc.  We allocate the arrays	 for the start and end in one block.  */      regs->start = re_malloc (regoff_t, 2 * need_regs);      if (BE (regs->start == NULL, 0))	return REGS_UNALLOCATED;      regs->end = regs->start + need_regs;      regs->num_regs = need_regs;    }  else if (regs_allocated == REGS_REALLOCATE)    { /* Yes.  If we need more elements than were already	 allocated, reallocate them.  If we need fewer, just	 leave it alone.  */      if (BE (need_regs > regs->num_regs, 0))	{	  regs->start = re_realloc (regs->start, regoff_t, 2 * need_regs);	  if (BE (regs->start == NULL, 0))	    {	      regs->end = NULL;	      return REGS_UNALLOCATED;	    }	  regs->end = regs->start + need_regs;	  regs->num_regs = need_regs;	}    }  else    {      assert (regs_allocated == REGS_FIXED);      /* This function may not be called with REGS_FIXED and nregs too big.  */      assert (regs->num_regs >= nregs);      rval = REGS_FIXED;    }  /* Copy the regs.  */  for (i = 0; i < nregs; ++i)    {      regs->start[i] = pmatch[i].rm_so;      regs->end[i] = pmatch[i].rm_eo;    }  for ( ; i < regs->num_regs; ++i)    regs->start[i] = regs->end[i] = -1;  return rval;}