From e9e3718ffa6cd280f8a7b1ff22487582d40384df Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Mon, 28 May 2018 15:07:05 +0200 Subject: [PATCH] Astat tool: fixed uninitialized members --- tools/astat.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/astat.cpp b/tools/astat.cpp index e3e8ac787..ea415c8a5 100644 --- a/tools/astat.cpp +++ b/tools/astat.cpp @@ -33,16 +33,16 @@ static ssize_t write_all(fd_t fd, const void *buf, size_t count) struct ug_connection { fd_t fd; ug_connection(int f, fd_t sef[]) : fd(f), should_exit_fd{sef[0], sef[1]}, t(worker, ref(*this)) {} - double volpeak[2]; - double volrms[2]; - int sample_count; + double volpeak[2] = {}; + double volrms[2] = {}; + int sample_count = 0; mutex lock; - volatile bool should_exit; + volatile bool should_exit = false; int should_exit_fd[2]; thread t; - bool connection_lost; + bool connection_lost = false; }; // Line format example: