diff --git a/data_structures/queue.c b/data_structures/queue.c index 828d3f7a..df4d91f9 100644 --- a/data_structures/queue.c +++ b/data_structures/queue.c @@ -66,7 +66,7 @@ void enque(int x) { * Takes the next item from the Queue. */ int deque() { - int returnData; + int returnData = 0; if(head == NULL) { printf("ERROR: Deque from empty queue.\n"); exit(1); @@ -78,6 +78,7 @@ int deque() { head = head->pre; head->next = NULL; } + return returnData; } /**