Skip to content

Commit

Permalink
balloon: Add braces around if statements
Browse files Browse the repository at this point in the history
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
  • Loading branch information
amit3s authored and Anthony Liguori committed Aug 4, 2011
1 parent 0a2a30d commit b80bc1d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions balloon.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,20 @@ 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)
{
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);
Expand Down

0 comments on commit b80bc1d

Please sign in to comment.