Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

serial: fix corner case in enqueue_raw_bytes #77

Merged
merged 1 commit into from
Jan 14, 2022

Conversation

lauralt
Copy link
Collaborator

@lauralt lauralt commented Jan 10, 2022

In case the serial fifo was full, but the user was trying to add 0 bytes to it , we were erroneously returning the FullFifo error. If the input buffer to be enqueued is empty, we return early now.

In case the serial fifo was full, but the user was trying to
add 0 bytes to it with the `enqueue_raw_bytes` method, we were
erroneously returning the FullFifo error. Refactored a bit
`enqueue_raw_bytes` so that we return early in case the buffer
to be enqueued is empty.

Signed-off-by: Laura Loghin <lauralg@amazon.com>
@andreeaflorescu andreeaflorescu merged commit 14906a0 into rust-vmm:main Jan 14, 2022
@lauralt lauralt deleted the fix_enqueue branch January 17, 2022 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants