From b8c4b67e3ec3918a40234e5c56221f780c7856fc Mon Sep 17 00:00:00 2001 From: Philippe Mathieu-Daudé Date: Thu, 5 Mar 2020 18:56:49 +0100 Subject: 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é Acked-by: David Gibson Reviewed-by: Alistair Francis Reviewed-by: Cédric Le Goater Signed-off-by: Jason Wang --- include/net/net.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/net/net.h') 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 *); -- cgit v1.2.3-55-g7522