mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-11-19 02:30:35 +03:00
Add q_last_type() queue function
Analogous to q_cur_type(), asserts that queue indices are within a valid range.
This commit is contained in:
committed by
Matthew Barr
parent
a6383a54a4
commit
cea914e18e
@@ -379,7 +379,7 @@ void ensureEnd(struct mq *q, UNUSED u32 qi, s64a final_loc) {
|
||||
DEBUG_PRINTF("ensure MQE_END %lld for queue %u\n", final_loc, qi);
|
||||
if (final_loc >= q_last_loc(q)) {
|
||||
/* TODO: ensure situation does not arise */
|
||||
assert(q->items[q->end - 1].type != MQE_END);
|
||||
assert(q_last_type(q) != MQE_END);
|
||||
pushQueueNoMerge(q, MQE_END, final_loc);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user