diff options
author | Philippe Mathieu-Daudé <philmd@redhat.com> | 2020-03-05 18:56:49 +0100 |
---|---|---|
committer | Jason Wang <jasowang@redhat.com> | 2020-03-31 21:14:35 +0800 |
commit | b8c4b67e3ec3918a40234e5c56221f780c7856fc (patch) | |
tree | 1ca475ca3fe280e0f857cfe1160b52753b53bd72 /hw/net/spapr_llan.c | |
parent | 3317db743972f665e2753c75703538d51241350a (diff) |
hw/net: Make NetCanReceive() return a boolean
The NetCanReceive handler return whether the device can or
can not receive new packets. Make it obvious by returning
a boolean type.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'hw/net/spapr_llan.c')
-rw-r--r-- | hw/net/spapr_llan.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/net/spapr_llan.c b/hw/net/spapr_llan.c index 80f5a1dd37..a2377025a7 100644 --- a/hw/net/spapr_llan.c +++ b/hw/net/spapr_llan.c @@ -110,11 +110,11 @@ typedef struct SpaprVioVlan { RxBufPool *rx_pool[RX_MAX_POOLS]; /* Receive buffer descriptor pools */ } SpaprVioVlan; -static int spapr_vlan_can_receive(NetClientState *nc) +static bool spapr_vlan_can_receive(NetClientState *nc) { SpaprVioVlan *dev = qemu_get_nic_opaque(nc); - return (dev->isopen && dev->rx_bufs > 0); + return dev->isopen && dev->rx_bufs > 0; } /** |