dda_queue.c: remove trigraphs in queue_full() and queue_empty().

Saves just 2 bytes binary size, but better than moving the work
to the trash.
This commit is contained in:
Markus Hitter 2015-08-04 22:35:11 +02:00
parent fa8ec35bc1
commit 9075459659
1 changed files with 6 additions and 6 deletions

View File

@ -41,9 +41,9 @@ DDA BSS movebuffer[MOVEBUFFER_SIZE];
uint8_t queue_full() {
MEMORY_BARRIER();
if (mb_tail > mb_head) {
return ((mb_tail - mb_head - 1) == 0) ? 255 : 0;
return (mb_tail - mb_head - 1 == 0);
} else {
return ((mb_tail + MOVEBUFFER_SIZE - mb_head - 1) == 0) ? 255 : 0;
return (mb_tail + MOVEBUFFER_SIZE - mb_head - 1 == 0);
}
}
@ -52,7 +52,7 @@ uint8_t queue_empty() {
uint8_t result;
ATOMIC_START
result = ((mb_tail == mb_head) && (movebuffer[mb_tail].live == 0))?255:0;
result = (mb_tail == mb_head && movebuffer[mb_tail].live == 0);
ATOMIC_END
return result;