summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmit Shah <amit.shah@redhat.com>2011-07-20 13:12:15 +0530
committerAmit Shah <amit.shah@redhat.com>2011-07-26 11:21:12 +0530
commit3583bc031e56ae4ea90ca518dfe5322d36d44780 (patch)
treecae4a00e76ee46e23731ed574c17ab413845ab31
parent2798b5e1747095592e3b83b3527ef91a78364c76 (diff)
downloadqemu-3583bc031e56ae4ea90ca518dfe5322d36d44780.tar.gz
balloon: Add braces around if statements
Signed-off-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com>
-rw-r--r--balloon.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/balloon.c b/balloon.c
index f9bcf07b19..86f629e77a 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);