diff mbox

[2/2] fsl_etsec: Fix various small problems in hexdump code

Message ID 1480356795-8043-2-git-send-email-andrew.smirnov@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Andrey Smirnov Nov. 28, 2016, 6:13 p.m. UTC
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>
---
 hw/net/fsl_etsec/etsec.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Jason Wang Nov. 30, 2016, 10:41 a.m. UTC | #1
On 2016年11月29日 02:13, Andrey Smirnov wrote:
> 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>
> ---
>   hw/net/fsl_etsec/etsec.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/net/fsl_etsec/etsec.c b/hw/net/fsl_etsec/etsec.c
> index b5c777f..1093d8b 100644
> --- a/hw/net/fsl_etsec/etsec.c
> +++ b/hw/net/fsl_etsec/etsec.c
> @@ -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;

Applied, thanks.
diff mbox

Patch

diff --git a/hw/net/fsl_etsec/etsec.c b/hw/net/fsl_etsec/etsec.c
index b5c777f..1093d8b 100644
--- a/hw/net/fsl_etsec/etsec.c
+++ b/hw/net/fsl_etsec/etsec.c
@@ -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;