iohandler: Use bool for boolean struct member and remove holes
Using bool reduces the size of the structure and improves readability. Two holes in the structure were removed. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
This commit is contained in:
parent
9b47b17e80
commit
c97feed13c
@ -33,13 +33,13 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef struct IOHandlerRecord {
|
typedef struct IOHandlerRecord {
|
||||||
int fd;
|
|
||||||
IOCanReadHandler *fd_read_poll;
|
IOCanReadHandler *fd_read_poll;
|
||||||
IOHandler *fd_read;
|
IOHandler *fd_read;
|
||||||
IOHandler *fd_write;
|
IOHandler *fd_write;
|
||||||
int deleted;
|
|
||||||
void *opaque;
|
void *opaque;
|
||||||
QLIST_ENTRY(IOHandlerRecord) next;
|
QLIST_ENTRY(IOHandlerRecord) next;
|
||||||
|
int fd;
|
||||||
|
bool deleted;
|
||||||
} IOHandlerRecord;
|
} IOHandlerRecord;
|
||||||
|
|
||||||
static QLIST_HEAD(, IOHandlerRecord) io_handlers =
|
static QLIST_HEAD(, IOHandlerRecord) io_handlers =
|
||||||
|
Loading…
Reference in New Issue
Block a user