MCPcopy Create free account
hub / github.com/creatale/node-dv / lqueueExtendArray

Function lqueueExtendArray

deps/leptonica/src/queue.c:222–237  ·  view source on GitHub ↗

! * \brief lqueueExtendArray() * * \param[in] lq lqueue * \return 0 if OK, 1 on error */

Source from the content-addressed store, hash-verified

220 * \return 0 if OK, 1 on error
221 */
222static l_int32
223lqueueExtendArray(L_QUEUE *lq)
224{
225 PROCNAME("lqueueExtendArray");
226
227 if (!lq)
228 return ERROR_INT("lq not defined", procName, 1);
229
230 if ((lq->array = (void **)reallocNew((void **)&lq->array,
231 sizeof(void *) * lq->nalloc,
232 2 * sizeof(void *) * lq->nalloc)) == NULL)
233 return ERROR_INT("new ptr array not returned", procName, 1);
234
235 lq->nalloc = 2 * lq->nalloc;
236 return 0;
237}
238
239
240/*!

Callers 1

lqueueAddFunction · 0.85

Calls 1

reallocNewFunction · 0.85

Tested by

no test coverage detected