From b8c4b67e3ec3918a40234e5c56221f780c7856fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Thu, 5 Mar 2020 18:56:49 +0100 Subject: hw/net: Make NetCanReceive() return a boolean MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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é Acked-by: David Gibson Reviewed-by: Alistair Francis Reviewed-by: Cédric Le Goater Signed-off-by: Jason Wang --- hw/net/i82596.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'hw/net/i82596.c') diff --git a/hw/net/i82596.c b/hw/net/i82596.c index 3b0efd0b57..055c3a1470 100644 --- a/hw/net/i82596.c +++ b/hw/net/i82596.c @@ -470,23 +470,23 @@ void i82596_h_reset(void *opaque) i82596_s_reset(s); } -int i82596_can_receive(NetClientState *nc) +bool i82596_can_receive(NetClientState *nc) { I82596State *s = qemu_get_nic_opaque(nc); if (s->rx_status == RX_SUSPENDED) { - return 0; + return false; } if (!s->lnkst) { - return 0; + return false; } if (USE_TIMER && !timer_pending(s->flush_queue_timer)) { - return 1; + return true; } - return 1; + return true; } #define MIN_BUF_SIZE 60 -- cgit v1.2.3