HV: Assignment should not mix with operator

Removed the postfix and prefix operation in assignment expression.
Noncompliant code example:
1) *a++ = *b ++;
2) a = arr[--b];

Signed-off-by: Yang, Yu-chu <yu-chu.yang@intel.com>
This commit is contained in:
Yang, Yu-chu
2018-07-09 16:16:29 -07:00
committed by lijinxia
parent 7ed292eeef
commit 39159ebe16
7 changed files with 43 additions and 20 deletions

View File

@@ -358,8 +358,10 @@ void vuart_console_rx_chars(uint32_t serial_handle)
}
if (vu->active != false) {
buf_idx = 0;
while (buf_idx < vbuf_len)
fifo_putchar(&vu->rxfifo, buffer[buf_idx++]);
while (buf_idx < vbuf_len) {
fifo_putchar(&vu->rxfifo, buffer[buf_idx]);
buf_idx++;
}
uart_toggle_intr(vu);
}