CO_fifo: static analysis: pointer subtraction [MISRA 2012 Rule 18.2, required]
This commit is contained in:
parent
36f7481778
commit
5749014c16
1 changed files with 1 additions and 1 deletions
|
|
@ -298,7 +298,7 @@ bool_t CO_fifo_CommSearch(CO_fifo_t *fifo, bool_t clear) {
|
|||
/* Clear buffer if set so */
|
||||
if (clear) {
|
||||
if (commandEnd != NULL) {
|
||||
fifo->readPtr = (size_t)(commandEnd - fifo->buf) + 1U;
|
||||
fifo->readPtr = ((size_t)commandEnd - (size_t)fifo->buf) + 1U;
|
||||
if (fifo->readPtr == fifo->bufSize) {
|
||||
fifo->readPtr = 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue