]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
LogEntry.h: init LogEntry::seq with 0
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 17 Sep 2014 07:35:15 +0000 (09:35 +0200)
committerSage Weil <sage@redhat.com>
Fri, 19 Sep 2014 18:34:50 +0000 (11:34 -0700)
CID 1238904 (#1 of 1): Uninitialized scalar variable (UNINIT)
 uninit_use_in_call: Using uninitialized value e.seq when calling
 log_to_syslog.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
(cherry picked from commit 2c2b413ee0af2a151999fcf72f44745b0a9d4ab2)

src/common/LogEntry.h

index 293afe41bfc7c93ec80c0318bb47a6cfd404cdad..7329595fd718b0ee6e54ecad1f5106b5fc50923a 100644 (file)
@@ -75,6 +75,8 @@ struct LogEntry {
   string msg;
   string channel;
 
+  LogEntry() : seq(0) {}
+
   LogEntryKey key() const { return LogEntryKey(who, stamp, seq); }
 
   void log_to_syslog(string level, string facility);