This commit is contained in:
Barra Ó Catháin 2023-10-26 17:33:57 +01:00
parent fe444ac8c8
commit ad4a65e4cd
1 changed files with 1 additions and 1 deletions

View File

@ -7,7 +7,7 @@
queue * createQueue(void) queue * createQueue(void)
{ {
// Allocate the memory for the queue: // Allocate the memory for the queue:
queue * newQueue = malloc(sizeof(queue)); queue * newQueue = calloc(1, sizeof(queue));
// Instantiate the variables in the data-structure: // Instantiate the variables in the data-structure:
newQueue->itemCount = 0; newQueue->itemCount = 0;