From c47d3c3b474b418d9471520517afd8c9e9893a39 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Thu, 1 Jun 2017 15:58:20 +0200 Subject: [PATCH 1/1] Initializing all struct by default to avoid errors Change-Id: I54eab7da7e5819f633a5612abe46d44550068aab Signed-off-by: Romain Forlot --- CAN-binder/low-can-binding/utils/socketcan.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CAN-binder/low-can-binding/utils/socketcan.cpp b/CAN-binder/low-can-binding/utils/socketcan.cpp index 1f7aaa61..3aa34d22 100644 --- a/CAN-binder/low-can-binding/utils/socketcan.cpp +++ b/CAN-binder/low-can-binding/utils/socketcan.cpp @@ -34,7 +34,9 @@ namespace utils /// @brief Construct a socket by moving an existing one. socketcan_t::socketcan_t(socketcan_t&& s) : socket_{s.socket_} - {} + { + ::memset(&tx_address_, 0, sizeof(tx_address_)); + } socketcan_t& socketcan_t::operator=(const socketcan_t& s) { -- 2.16.6