Skip to content

Commit 844395b

Browse files
authored
Merge pull request #10 from EricccTaiwan/main
Fix full condition check
2 parents 5925766 + 5f2f97f commit 844395b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

simrupt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ static void produce_data(unsigned char val)
6666
* before inserting the new one.
6767
*/
6868
unsigned int len;
69-
if (kfifo_avail(&rx_fifo) < sizeof(val)) {
69+
if (kfifo_is_full(&rx_fifo)) {
7070
unsigned char dummy;
7171
len = kfifo_out(&rx_fifo, &dummy, sizeof(dummy));
7272
if (len != sizeof(dummy))

0 commit comments

Comments
 (0)