Skip to content

Commit

Permalink
Rename queue 'index' variable to 'next' to clarify what it is.
Browse files Browse the repository at this point in the history
  • Loading branch information
auouymous committed Sep 30, 2024
1 parent d641fce commit 7dccd06
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ void enqueue(int value)
return;
}
}
int index = (tail + 1) % length;
if (index == head)
int next = (tail + 1) % length;
if (next == head)
{
return;
}
store[tail] = value;
tail = index;
tail = next;
}

/**
Expand Down

0 comments on commit 7dccd06

Please sign in to comment.