Skip to content

Commit 40e2d4f

Browse files
committed
Always return true when sorting a null queue
1 parent cac7abd commit 40e2d4f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

qtest.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,8 @@ bool do_sort(int argc, char *argv[])
485485
exception_cancel();
486486
set_noallocate_mode(false);
487487

488+
if (q == NULL)
489+
return true;
488490
list_ele_t *e = q->head;
489491
bool ok = true;
490492
while (ok && e && --cnt) {

0 commit comments

Comments
 (0)