HV: vuart: MISRA clean in vuart.c

1. remove multiple return
2. remove goto
3. fix potential NULL pointer dereferencing
4. rename struct fifo to struct vuart_fifo to avoid naming conflicts.

Tracked-On: #2987
Signed-off-by: Conghui Chen <conghui.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Conghui Chen
2019-04-29 14:39:57 +08:00
committed by ACRN System Integration
parent c61db6ffa0
commit a4b5e39fab
2 changed files with 151 additions and 159 deletions

View File

@@ -48,7 +48,7 @@
#define COM3_IRQ 6U
#define COM4_IRQ 7U
struct fifo {
struct vuart_fifo {
char *buf;
uint32_t rindex; /* index to read from */
uint32_t windex; /* index to write to */