aboutsummaryrefslogtreecommitdiff
path: root/lib/memory.c
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2013-04-03 05:52:12 -0700
committerBen Pfaff <blp@nicira.com>2013-04-03 05:52:12 -0700
commitb9de4087685a16f3c8dd1a5b719219ff14ad5b65 (patch)
tree85c673fe76c40bbb7fbe5c6386f9493d393b5dfb /lib/memory.c
parent778ea0a463e08b2f47d69288367ac7960712fb0c (diff)
memory: Avoid an empty log message if there's nothing to log.
I spotted this in a case where I ran ovsdb-server, by hand, on an empty database. Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'lib/memory.c')
-rw-r--r--lib/memory.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/memory.c b/lib/memory.c
index 1babfe9f..c26c743f 100644
--- a/lib/memory.c
+++ b/lib/memory.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012 Nicira, Inc.
+ * Copyright (c) 2012, 2013 Nicira, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -137,7 +137,7 @@ memory_report(const struct simap *usage)
ds_init(&s);
compose_report(usage, &s);
- if (want_report) {
+ if (want_report && s.length) {
VLOG_INFO("%s", ds_cstr(&s));
want_report = false;
}