optimize cmd.c code standard

This commit is contained in:
Liu_Weichao
2021-05-10 17:04:27 +08:00
parent a8eb0f1617
commit f90ac499be
2 changed files with 14 additions and 21 deletions
+2 -3
View File
@@ -344,12 +344,11 @@ static inline int SerialDevPollingRead(struct SerialHardwareDevice *serial_dev,
x_size_t read_length = read_param->size;
uint8 get_char;
x_err_t ret = EOK;
while (read_length)
{
ret = hwdev_done->get_char(serial_dev);
if (-ERROR == ret) {
get_char = hwdev_done->get_char(serial_dev);
if (-ERROR == get_char) {
break;
}