浏览代码

async: Use bool for boolean struct members and remove a hole

Using bool reduces the size of the structure and improves readability.
A hole in the structure was removed.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Stefan Weil 13 年之前
父节点
当前提交
9b47b17e80
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      async.c

+ 3 - 3
async.c

@@ -35,10 +35,10 @@ static struct QEMUBH *first_bh;
 struct QEMUBH {
 struct QEMUBH {
     QEMUBHFunc *cb;
     QEMUBHFunc *cb;
     void *opaque;
     void *opaque;
-    int scheduled;
-    int idle;
-    int deleted;
     QEMUBH *next;
     QEMUBH *next;
+    bool scheduled;
+    bool idle;
+    bool deleted;
 };
 };
 
 
 QEMUBH *qemu_bh_new(QEMUBHFunc *cb, void *opaque)
 QEMUBH *qemu_bh_new(QEMUBHFunc *cb, void *opaque)