Skip to content

Commit

Permalink
one line
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelMohn committed Dec 2, 2023
1 parent e3b395f commit 50a821f
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions Apps/Inc/fifo.h
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,7 @@ POPBACK (FIFO_TYPE_NAME *fifo, FIFO_TYPE *elem) {
static int __attribute__((unused))
SPACE (FIFO_TYPE_NAME *fifo) {
if(!IS_EMPTY(fifo)) {
if(fifo->put > fifo->get){
return FIFO_SIZE - (fifo->put - fifo->get);
}else{
return fifo->get - fifo->put;
}
((fifo->get - fifo->put) + FIFO_SIZE) % FIFO_SIZE;
}

return FIFO_SIZE;
Expand Down

0 comments on commit 50a821f

Please sign in to comment.