iohandler: Use bool for boolean struct member and remove holes
authorStefan Weil <sw@weilnetz.de>
Sun, 29 Apr 2012 17:08:46 +0000 (19:08 +0200)
committerStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Tue, 1 May 2012 09:13:33 +0000 (10:13 +0100)
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>
iohandler.c

index 5640d49..3c74de6 100644 (file)
 #endif
 
 typedef struct IOHandlerRecord {
-    int fd;
     IOCanReadHandler *fd_read_poll;
     IOHandler *fd_read;
     IOHandler *fd_write;
-    int deleted;
     void *opaque;
     QLIST_ENTRY(IOHandlerRecord) next;
+    int fd;
+    bool deleted;
 } IOHandlerRecord;
 
 static QLIST_HEAD(, IOHandlerRecord) io_handlers =