]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
fsl_etsec: Fix various small problems in hexdump code
authorAndrey Smirnov <andrew.smirnov@gmail.com>
Mon, 28 Nov 2016 18:13:15 +0000 (10:13 -0800)
committerJason Wang <jasowang@redhat.com>
Tue, 6 Dec 2016 02:23:50 +0000 (10:23 +0800)
Fix various small problems in hexdump code, such as:
    - Reference to non-existing field etsec->nic->nc.name is replaced
    with nc->name

    - Type mismatch warnings

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
hw/net/fsl_etsec/etsec.c

index 951c5f0038eb8238013bd2f593435de59b013d5d..fadf9c8faf568ee9d82ded8d827d94c077fc7bde 100644 (file)
@@ -348,8 +348,8 @@ static ssize_t etsec_receive(NetClientState *nc,
     eTSEC *etsec = qemu_get_nic_opaque(nc);
 
 #if defined(HEX_DUMP)
-    fprintf(stderr, "%s receive size:%d\n", etsec->nic->nc.name, size);
-    qemu_hexdump(buf, stderr, "", size);
+    fprintf(stderr, "%s receive size:%zd\n", nc->name, size);
+    qemu_hexdump((void *)buf, stderr, "", size);
 #endif
     /* Flush is unnecessary as are already in receiving path */
     etsec->need_flush = false;