--- In [email protected], Ravi Mishra <ravics...@...> wrote:
>
> for (delIndex = rachQIndex; delIndex < rachTxQueue->n; delIndex++) {
> rachTxQueue->queue[(delIndex + rachTxQueue->start) %
> (petMaxUEInstancePerProcess+1)]
> = rachTxQueue->queue[(delIndex + rachTxQueue->start + 1) %
> (petMaxUEInstancePerProcess+1)];
> }
> rachTxQueue->n--;
If the queue is 0..n-1 then delIndex should be a maximum of n-2 ie. it should
be:
for (delIndex = rachQIndex; delIndex < rachTxQueue->n - 1; delIndex++) {
or you could decrement rachTxQueue->n before the loop.