From: Joao Eduardo Luis Date: Wed, 21 Jan 2015 17:47:20 +0000 (+0000) Subject: include/util.h: initialize ceph_data_stats to zero X-Git-Tag: v0.94~57^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b8c7baec841e9fecc8abfb4e1578b0a5675f9cd7;p=ceph.git include/util.h: initialize ceph_data_stats to zero We decode this struct on the monitor. Although at the moment there's no reports of any weird behavior by not initializing it, let's avoid it completely by setting member values to zero -- just in case and because it's a good policy. Signed-off-by: Joao Eduardo Luis --- diff --git a/src/include/util.h b/src/include/util.h index 4e4476ad644c..7801d0654c46 100644 --- a/src/include/util.h +++ b/src/include/util.h @@ -30,6 +30,13 @@ struct ceph_data_stats uint64_t byte_avail; int avail_percent; + ceph_data_stats() : + byte_total(0), + byte_used(0), + byte_avail(0), + avail_percent(0) + { } + void dump(Formatter *f) const { assert(f != NULL); f->dump_int("total", byte_total);