mirror of
https://github.com/TheAlgorithms/C.git
synced 2026-02-14 13:54:36 +00:00
a bug #26
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @zphiliam on GitHub (Feb 27, 2019).
C/data_structures/stack.c
I think there is a bug !
the
node->nextalways equal toNULL@itaikla commented on GitHub (Jun 7, 2019):
You are right, node->next is always equal to NULL, but it's not a bug, the author just did not use it.
Because you actually can implement a stack with only one pointer to next node (prev or node in that case is a semantic issue), like singly linked list.
@ashwek commented on GitHub (Jun 8, 2019):
@zphiliam thank you for reporting the issue.
well
node->nextbeingNULLis not a bug, but due to thisb1fed3cf3e/data_structures/stack.c (L111)this line becomes useless.