pike.git / src / array.c

version» Context lines:

pike.git/src/array.c:1272:    ret=allocate_array(10);    ret->size=0;       init_memsearch(&searcher, del->str, del->len, str->len);       while((tmp=memory_search(&searcher, s, end-s)))    {    if(ret->size == ret->malloced_size)    {    e=ret->size; -  ret=resize_array(ret, ret->size * 2); -  ret->size=0; +  ret=resize_array(ret, e * 2); +  ret->size=e;    }       ITEM(ret)[ret->size].u.string=make_shared_binary_string(s, tmp-s);    ITEM(ret)[ret->size].type=T_STRING;    ret->size++;       s=tmp+del->len;    }       if(ret->size == ret->malloced_size) -  ret=resize_array(ret, ret->size * 2); +  { +  e=ret->size; +  ret=resize_array(ret, e * 2); +  ret->size=e; +  }       ITEM(ret)[ret->size].u.string=make_shared_binary_string(s, end-s);    ITEM(ret)[ret->size].type=T_STRING;    ret->size++;    }    ret->type_field=BIT_STRING;    return ret;   }      struct pike_string *implode(struct array *a,struct pike_string *del)