fix(driver): remove unecessary if conditions in the read function

This changes affect usb_serial_jtag_vfs and cdcacm_vfs read functions.
This commit removes the exit condition on reception of \n character.
This commit is contained in:
Guillaume Souchere
2025-05-29 13:30:19 +02:00
parent 11ad7e0581
commit a3270694f0
2 changed files with 0 additions and 6 deletions

View File

@@ -257,9 +257,6 @@ static ssize_t usb_serial_jtag_read(int fd, void* data, size_t size)
}
data_c[received] = (char) c;
++received;
if (c == '\n') {
break;
}
}
_lock_release_recursive(&s_ctx.read_lock);
if (received > 0) {

View File

@@ -225,9 +225,6 @@ static ssize_t cdcacm_read(int fd, void *data, size_t size)
break;
}
data_c[received++] = (char) c;
if (c == '\n') {
break;
}
}
}
_lock_release_recursive(&s_read_lock);