diff options
author | Philippe Mathieu-Daudé <philmd@redhat.com> | 2020-03-05 18:56:46 +0100 |
---|---|---|
committer | Jason Wang <jasowang@redhat.com> | 2020-03-31 21:14:35 +0800 |
commit | 0002c3a696b2def7eda13d5fb722e45679959d22 (patch) | |
tree | 7dd6c4f88ecd43a113a8c294dafc83249e021f34 /hw/net/smc91c111.c | |
parent | 205ce5670f8ec38693ab945493e4fcc155b25cec (diff) |
hw/net/smc91c111: Let smc91c111_can_receive() return a boolean
The smc91c111_can_receive() function simply returns a boolean value.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
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/smc91c111.c')
-rw-r--r-- | hw/net/smc91c111.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/net/smc91c111.c b/hw/net/smc91c111.c index e9eb6f6c05..02be60c955 100644 --- a/hw/net/smc91c111.c +++ b/hw/net/smc91c111.c @@ -130,16 +130,16 @@ static void smc91c111_update(smc91c111_state *s) qemu_set_irq(s->irq, level); } -static int smc91c111_can_receive(smc91c111_state *s) +static bool smc91c111_can_receive(smc91c111_state *s) { if ((s->rcr & RCR_RXEN) == 0 || (s->rcr & RCR_SOFT_RST)) { - return 1; + return true; } if (s->allocated == (1 << NUM_PACKETS) - 1 || s->rx_fifo_len == NUM_PACKETS) { - return 0; + return false; } - return 1; + return true; } static inline void smc91c111_flush_queued_packets(smc91c111_state *s) |