OSDN Git Service

dp8393x: Have dp8393x_receive() return the packet size
authorFinn Thain <fthain@telegraphics.com.au>
Wed, 29 Jan 2020 09:27:49 +0000 (20:27 +1100)
committerJason Wang <jasowang@redhat.com>
Tue, 3 Mar 2020 10:04:47 +0000 (18:04 +0800)
commit9e3cd456d85ad45e72bdba99203302342ce29b3b
treebb1bbfa2a7ca552f8387057f17a203bce68600c2
parent46ffee9ad43185cbee4182c208bbd534814086ca
dp8393x: Have dp8393x_receive() return the packet size

This function re-uses its 'size' argument as a scratch variable.
Instead, declare a local 'size' variable for that purpose so that the
function result doesn't get messed up.

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Jason Wang <jasowang@redhat.com>
hw/net/dp8393x.c