diff options
author | Philippe Mathieu-Daudé | 2020-03-05 18:56:49 +0100 |
---|---|---|
committer | Jason Wang | 2020-03-31 15:14:35 +0200 |
commit | b8c4b67e3ec3918a40234e5c56221f780c7856fc (patch) | |
tree | 1ca475ca3fe280e0f857cfe1160b52753b53bd72 /include/net/net.h | |
parent | hw/net/rtl8139: Update coding style to make checkpatch.pl happy (diff) | |
download | qemu-b8c4b67e3ec3918a40234e5c56221f780c7856fc.tar.gz qemu-b8c4b67e3ec3918a40234e5c56221f780c7856fc.tar.xz qemu-b8c4b67e3ec3918a40234e5c56221f780c7856fc.zip |
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 'include/net/net.h')
-rw-r--r-- | include/net/net.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/net.h b/include/net/net.h index 094e966af9..39085d9444 100644 --- a/include/net/net.h +++ b/include/net/net.h @@ -42,7 +42,7 @@ typedef struct NICConf { /* Net clients */ typedef void (NetPoll)(NetClientState *, bool enable); -typedef int (NetCanReceive)(NetClientState *); +typedef bool (NetCanReceive)(NetClientState *); typedef ssize_t (NetReceive)(NetClientState *, const uint8_t *, size_t); typedef ssize_t (NetReceiveIOV)(NetClientState *, const struct iovec *, int); typedef void (NetCleanup) (NetClientState *); |