Skip to content

Commit

Permalink
push comment added back
Browse files Browse the repository at this point in the history
  • Loading branch information
remzi-arpacidusseau committed Aug 16, 2021
1 parent ec258ee commit bf8bf14
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions file-intro/pstack.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ int main(int argc, char *argv[]) {
if (strcmp(argv[i], "pop") == 0) {
if (p->n > 0) // stack not empty
printf("%d\n", p->stack[--p->n]);
} else {
if (sizeof(pstack_t) + (1 + p->n) * sizeof(int) <= file_size) // stack not full
} else { // push
if (sizeof(pstack_t) + (1 + p->n) * sizeof(int) <= file_size) // stack not full
p->stack[p->n++] = atoi(argv[i]);
}
(void) close(fd);
Expand Down

0 comments on commit bf8bf14

Please sign in to comment.