Skip to content
Snippets Groups Projects
Commit e8f117f3 authored by Daniel P. Berrangé's avatar Daniel P. Berrangé
Browse files

io: convert QIOChannelBuffer to use uint8_t instead of char


The QIOChannelBuffer struct uses a 'char *' for its data
buffer. It will give simpler type compatibility with the
migration APIs if it uses 'uint8_t *' instead, avoiding
several casts.

Signed-off-by: default avatarDaniel P. Berrange <berrange@redhat.com>
parent c767ae62
No related branches found
No related tags found
No related merge requests found
......@@ -42,7 +42,7 @@ struct QIOChannelBuffer {
size_t capacity; /* Total allocated memory */
size_t usage; /* Current size of data */
size_t offset; /* Offset for future I/O ops */
char *data;
uint8_t *data;
};
......
......@@ -32,7 +32,7 @@ qio_channel_buffer_new(size_t capacity)
ioc = QIO_CHANNEL_BUFFER(object_new(TYPE_QIO_CHANNEL_BUFFER));
if (capacity) {
ioc->data = g_new0(char, capacity);
ioc->data = g_new0(uint8_t, capacity);
ioc->capacity = capacity;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment