[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 2/7] balloon: Add braces around if statements
From: |
Amit Shah |
Subject: |
[Qemu-devel] [PATCH 2/7] balloon: Add braces around if statements |
Date: |
Wed, 20 Jul 2011 14:15:12 +0530 |
Signed-off-by: Amit Shah <address@hidden>
---
balloon.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/balloon.c b/balloon.c
index f9bcf07..86f629e 100644
--- a/balloon.c
+++ b/balloon.c
@@ -65,9 +65,10 @@ static void print_balloon_stat(const char *key, QObject
*obj, void *opaque)
{
Monitor *mon = opaque;
- if (strcmp(key, "actual"))
+ if (strcmp(key, "actual")) {
monitor_printf(mon, ",%s=%" PRId64, key,
qint_get_int(qobject_to_qint(obj)));
+ }
}
void monitor_print_balloon(Monitor *mon, const QObject *data)
@@ -75,9 +76,9 @@ void monitor_print_balloon(Monitor *mon, const QObject *data)
QDict *qdict;
qdict = qobject_to_qdict(data);
- if (!qdict_haskey(qdict, "actual"))
+ if (!qdict_haskey(qdict, "actual")) {
return;
-
+ }
monitor_printf(mon, "balloon: actual=%" PRId64,
qdict_get_int(qdict, "actual") >> 20);
qdict_iter(qdict, print_balloon_stat, mon);
--
1.7.6
- [Qemu-devel] [PATCH 0/7] balloon: cleanups, fix segfault, Amit Shah, 2011/07/20
- [Qemu-devel] [PATCH 1/7] balloon: Make functions, local vars static, Amit Shah, 2011/07/20
- [Qemu-devel] [PATCH 2/7] balloon: Add braces around if statements,
Amit Shah <=
- [Qemu-devel] [PATCH 3/7] balloon: Simplify code flow, Amit Shah, 2011/07/20
- [Qemu-devel] [PATCH 4/7] virtio-balloon: Separate status handling into separate function, Amit Shah, 2011/07/20
- [Qemu-devel] [PATCH 5/7] balloon: Separate out stat and balloon handling, Amit Shah, 2011/07/20
- [Qemu-devel] [PATCH 6/7] balloon: Fix header comment; add Copyright, Amit Shah, 2011/07/20
- [Qemu-devel] [PATCH 7/7] virtio-balloon: Fix header comment; add Copyright, Amit Shah, 2011/07/20
- Re: [Qemu-devel] [PATCH 0/7] balloon: cleanups, fix segfault, Markus Armbruster, 2011/07/25