balloon: Add braces around if statements

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
Amit Shah 2011-07-20 13:12:15 +05:30 committed by Anthony Liguori
parent 0a2a30d5ad
commit b80bc1ddb2

View File

@ -65,9 +65,10 @@ static void print_balloon_stat(const char *key, QObject *obj, void *opaque)
{ {
Monitor *mon = opaque; Monitor *mon = opaque;
if (strcmp(key, "actual")) if (strcmp(key, "actual")) {
monitor_printf(mon, ",%s=%" PRId64, key, monitor_printf(mon, ",%s=%" PRId64, key,
qint_get_int(qobject_to_qint(obj))); qint_get_int(qobject_to_qint(obj)));
}
} }
void monitor_print_balloon(Monitor *mon, const QObject *data) 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 *qdict;
qdict = qobject_to_qdict(data); qdict = qobject_to_qdict(data);
if (!qdict_haskey(qdict, "actual")) if (!qdict_haskey(qdict, "actual")) {
return; return;
}
monitor_printf(mon, "balloon: actual=%" PRId64, monitor_printf(mon, "balloon: actual=%" PRId64,
qdict_get_int(qdict, "actual") >> 20); qdict_get_int(qdict, "actual") >> 20);
qdict_iter(qdict, print_balloon_stat, mon); qdict_iter(qdict, print_balloon_stat, mon);