From patchwork Tue May 1 09:35:54 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 156045 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 4583AB6FA5 for ; Tue, 1 May 2012 19:53:47 +1000 (EST) Received: from localhost ([::1]:39126 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SP9Vu-0003li-Io for incoming@patchwork.ozlabs.org; Tue, 01 May 2012 05:36:54 -0400 Received: from eggs.gnu.org ([208.118.235.92]:49533) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SP9Va-0002y5-Qn for qemu-devel@nongnu.org; Tue, 01 May 2012 05:36:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SP9VZ-0003Et-0Y for qemu-devel@nongnu.org; Tue, 01 May 2012 05:36:34 -0400 Received: from e06smtp10.uk.ibm.com ([195.75.94.106]:56921) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SP9VY-0003DA-OD for qemu-devel@nongnu.org; Tue, 01 May 2012 05:36:32 -0400 Received: from /spool/local by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 1 May 2012 10:36:29 +0100 Received: from d06nrmr1307.portsmouth.uk.ibm.com (9.149.38.129) by e06smtp10.uk.ibm.com (192.168.101.140) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 1 May 2012 10:35:59 +0100 Received: from d06av12.portsmouth.uk.ibm.com (d06av12.portsmouth.uk.ibm.com [9.149.37.247]) by d06nrmr1307.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q419ZxIR2719980 for ; Tue, 1 May 2012 10:35:59 +0100 Received: from d06av12.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av12.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q419Zx7D021108 for ; Tue, 1 May 2012 03:35:59 -0600 Received: from localhost (stefanha-thinkpad.manchester-maybrook.uk.ibm.com [9.174.219.241]) by d06av12.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id q419ZwED021105; Tue, 1 May 2012 03:35:58 -0600 From: Stefan Hajnoczi To: Anthony Liguori Date: Tue, 1 May 2012 10:35:54 +0100 Message-Id: <1335864955-30495-3-git-send-email-stefanha@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1335864955-30495-1-git-send-email-stefanha@linux.vnet.ibm.com> References: <1335864955-30495-1-git-send-email-stefanha@linux.vnet.ibm.com> x-cbid: 12050109-4966-0000-0000-0000022E486B X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 195.75.94.106 Cc: Stefan Weil , qemu-devel@nongnu.org, Stefan Hajnoczi Subject: [Qemu-devel] [PATCH 2/3] async: Use bool for boolean struct members and remove a hole X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Stefan Weil Using bool reduces the size of the structure and improves readability. A hole in the structure was removed. Signed-off-by: Stefan Weil Signed-off-by: Stefan Hajnoczi --- async.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/async.c b/async.c index ecdaf15..85cc641 100644 --- a/async.c +++ b/async.c @@ -35,10 +35,10 @@ static struct QEMUBH *first_bh; struct QEMUBH { QEMUBHFunc *cb; void *opaque; - int scheduled; - int idle; - int deleted; QEMUBH *next; + bool scheduled; + bool idle; + bool deleted; }; QEMUBH *qemu_bh_new(QEMUBHFunc *cb, void *opaque)