Skip to content

Commit bdd025b

Browse files
committed
add new line when stack is empty to pstr function
1 parent 58795d2 commit bdd025b

File tree

4 files changed

+2
-4
lines changed

4 files changed

+2
-4
lines changed

Diff for: .stack.c.swp

12 KB
Binary file not shown.

Diff for: 1000-school.bf

-1
This file was deleted.

Diff for: monty

0 Bytes
Binary file not shown.

Diff for: pstr.c

+2-3
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,14 @@
77
*
88
* Return: void
99
*/
10-
void pstr(stack_t **head, unsigned int line_number)
10+
void pstr(stack_t **head, __attribute__((unused)) unsigned int line_number)
1111
{
1212
int num;
1313
stack_t *temp;
1414

1515
if ((*head) == NULL)
1616
{
17-
fprintf(stderr, "L%d: can't pstr, stack empty\n", line_number);
18-
exit(EXIT_FAILURE);
17+
putchar('\n');
1918
}
2019

2120
temp = (*head);

0 commit comments

Comments
 (0)