On Fri, Oct 31, 2025 at 10:13:51AM +0100, Philippe Mathieu-Daudé wrote:
> I/O channel read/write functions can operate on any area of
> memory, regardless of the content their represent. Do not
> restrict to array of char, use the void* type, which is also
> the type of the underlying iovec::iov_base field.
>
> Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
> ---
> include/crypto/tlssession.h | 4 ++--
> include/io/channel.h | 14 +++++++-------
> io/channel-tls.c | 4 ++--
> io/channel.c | 14 +++++++-------
> 4 files changed, 18 insertions(+), 18 deletions(-)
Also needs a change to tests:
diff --git a/tests/unit/test-crypto-tlssession.c
b/tests/unit/test-crypto-tlssession.c
index d0baf3b304..0d06a6892e 100644
--- a/tests/unit/test-crypto-tlssession.c
+++ b/tests/unit/test-crypto-tlssession.c
@@ -36,7 +36,7 @@
#define KEYFILE WORKDIR "key-ctx.pem"
static ssize_t
-testWrite(const char *buf, size_t len, void *opaque, Error **errp)
+testWrite(const void *buf, size_t len, void *opaque, Error **errp)
{
int *fd = opaque;
int ret;
@@ -54,7 +54,7 @@ testWrite(const char *buf, size_t len, void *opaque, Error
**errp)
}
static ssize_t
-testRead(char *buf, size_t len, void *opaque, Error **errp)
+testRead(void *buf, size_t len, void *opaque, Error **errp)
{
int *fd = opaque;
int ret;
which I've made locally when queuing this patch, so no need to resend.
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|