! * \brief lqueueExtendArray() * * \param[in] lq lqueue * \return 0 if OK, 1 on error */
| 220 | * \return 0 if OK, 1 on error |
| 221 | */ |
| 222 | static l_int32 |
| 223 | lqueueExtendArray(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 | /*! |
no test coverage detected