Skip to content

Commit

Permalink
Rename node_ptr to nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
yenslife committed Mar 25, 2024
1 parent 32553a2 commit d86d3ec
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions qtest.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 "
Expand Down Expand Up @@ -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;
}
}
Expand Down

0 comments on commit d86d3ec

Please sign in to comment.