Philippe Mathieu-Daudé c7274b5ef4 net/eth: Add an assert() and invert if() statement to simplify code
To simplify the function body, invert the if() statement, returning
earlier.
Since we already checked there is enough data in the iovec buffer,
simply add an assert() call to consume the bytes_read variable.

Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Miroslav Rezanina <mrezanin@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
2021-03-22 17:34:31 +08:00
..
2020-12-15 10:02:07 -05:00
2020-12-15 10:02:07 -05:00
2020-12-15 10:02:07 -05:00
2021-03-15 16:41:22 +08:00
2021-03-15 16:41:22 +08:00