diff --git a/qtest.c b/qtest.c index f91d0250b..5d2cc0c7a 100644 --- a/qtest.c +++ b/qtest.c @@ -604,13 +604,13 @@ bool do_sort(int argc, char *argv[]) /* If the number of elements is too large, it may take a long time to check the * stability of the sort. So, MAX_NODES is used to limit the number of elements * to check the stability of the sort. */ -#define MAX_NODES 100000 - struct list_head *node_ptrs[MAX_NODES]; +#define MAX_NODES 1000000 + struct list_head *nodes[MAX_NODES]; unsigned no = 0; if (current && current->size) { element_t *entry; list_for_each_entry (entry, current->q, list) { - node_ptrs[no++] = &entry->list; + nodes[no++] = &entry->list; if (no >= MAX_NODES) { report(1, "Skip the stability check because the number of " @@ -648,11 +648,11 @@ bool do_sort(int argc, char *argv[]) if (no < MAX_NODES && !strcmp(item->value, next_item->value)) { bool unstable = false; for (unsigned i = 0; i < MAX_NODES; i++) { - if (node_ptrs[i] == cur_l->next) { + if (nodes[i] == cur_l->next) { unstable = true; break; } - if (node_ptrs[i] == cur_l) { + if (nodes[i] == cur_l) { break; } }