Patchwork [for-1.4,03/12] qmp: Clean up type usage in qmp_memchar_write(), qmp_memchar_read()

login
register
mail settings
Submitter Markus Armbruster
Date Feb. 5, 2013, 4:22 p.m.
Message ID <1360081335-6594-4-git-send-email-armbru@redhat.com>
Download mbox | patch
Permalink /patch/218290/
State New
Headers show

Comments

Markus Armbruster - Feb. 5, 2013, 4:22 p.m.
Const-correctness, consistently use standard C types instead of mixing
them with GLib types.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 qemu-char.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Eric Blake - Feb. 5, 2013, 5:16 p.m.
On 02/05/2013 09:22 AM, Markus Armbruster wrote:
> Const-correctness, consistently use standard C types instead of mixing
> them with GLib types.
> 
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
>  qemu-char.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Reviewed-by: Eric Blake <eblake@redhat.com>

Patch

diff --git a/qemu-char.c b/qemu-char.c
index 6de8aff..892d5bb 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -2758,9 +2758,9 @@  void qmp_memchar_write(const char *device, const char *data,
                        Error **errp)
 {
     CharDriverState *chr;
-    guchar *write_data;
+    const uint8_t *write_data;
     int ret;
-    gsize write_count;
+    size_t write_count;
 
     chr = qemu_chr_find(device);
     if (!chr) {
@@ -2793,7 +2793,7 @@  char *qmp_memchar_read(const char *device, int64_t size,
                        Error **errp)
 {
     CharDriverState *chr;
-    guchar *read_data;
+    uint8_t *read_data;
     size_t count;
     char *data;