Re: [PATCH v3 1/2] QIOChannelSocket: Introduce assert and reduce ifdefs to improve readability

2022-06-14 Thread Daniel P . Berrangé
On Tue, Jun 14, 2022 at 02:17:25AM -0300, Leonardo Bras wrote: > During implementation of MSG_ZEROCOPY feature, a lot of #ifdefs were > introduced, particularly at qio_channel_socket_writev(). > > Rewrite some of those changes so it's easier to read. > > Also, introduce an assert to help detect i

[PATCH v3 1/2] QIOChannelSocket: Introduce assert and reduce ifdefs to improve readability

2022-06-13 Thread Leonardo Bras
During implementation of MSG_ZEROCOPY feature, a lot of #ifdefs were introduced, particularly at qio_channel_socket_writev(). Rewrite some of those changes so it's easier to read. Also, introduce an assert to help detect incorrect zero-copy usage is when it's disabled on build. Signed-off-by: Le