* [Qemu-trivial] [PATCH 1/2] async: Use bool for boolean struct members and remove a hole
@ 2012-04-29 17:08 Stefan Weil
2012-04-29 17:08 ` [Qemu-trivial] [PATCH 2/2] iohandler: Use bool for boolean struct member and remove holes Stefan Weil
2012-05-01 9:13 ` [Qemu-trivial] [Qemu-devel] [PATCH 1/2] async: Use bool for boolean struct members and remove a hole Stefan Hajnoczi
0 siblings, 2 replies; 3+ messages in thread
From: Stefan Weil @ 2012-04-29 17:08 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, 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 <sw@weilnetz.de>
---
async.c | 6 +++---
1 files 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)
--
1.7.9
^ permalink raw reply related [flat|nested] 3+ messages in thread* [Qemu-trivial] [PATCH 2/2] iohandler: Use bool for boolean struct member and remove holes
2012-04-29 17:08 [Qemu-trivial] [PATCH 1/2] async: Use bool for boolean struct members and remove a hole Stefan Weil
@ 2012-04-29 17:08 ` Stefan Weil
2012-05-01 9:13 ` [Qemu-trivial] [Qemu-devel] [PATCH 1/2] async: Use bool for boolean struct members and remove a hole Stefan Hajnoczi
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Weil @ 2012-04-29 17:08 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Stefan Weil
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>
---
iohandler.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/iohandler.c b/iohandler.c
index 5640d49..3c74de6 100644
--- a/iohandler.c
+++ b/iohandler.c
@@ -33,13 +33,13 @@
#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 =
--
1.7.9
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [Qemu-trivial] [Qemu-devel] [PATCH 1/2] async: Use bool for boolean struct members and remove a hole
2012-04-29 17:08 [Qemu-trivial] [PATCH 1/2] async: Use bool for boolean struct members and remove a hole Stefan Weil
2012-04-29 17:08 ` [Qemu-trivial] [PATCH 2/2] iohandler: Use bool for boolean struct member and remove holes Stefan Weil
@ 2012-05-01 9:13 ` Stefan Hajnoczi
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2012-05-01 9:13 UTC (permalink / raw)
To: Stefan Weil; +Cc: qemu-trivial, qemu-devel
On Sun, Apr 29, 2012 at 07:08:45PM +0200, Stefan Weil wrote:
> 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>
> ---
> async.c | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
Thanks, applied both to the trivial patches tree:
https://github.com/stefanha/qemu/commits/trivial-patches
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-05-01 9:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-29 17:08 [Qemu-trivial] [PATCH 1/2] async: Use bool for boolean struct members and remove a hole Stefan Weil
2012-04-29 17:08 ` [Qemu-trivial] [PATCH 2/2] iohandler: Use bool for boolean struct member and remove holes Stefan Weil
2012-05-01 9:13 ` [Qemu-trivial] [Qemu-devel] [PATCH 1/2] async: Use bool for boolean struct members and remove a hole Stefan Hajnoczi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).