From: Romain Forlot Date: Thu, 1 Jun 2017 13:58:20 +0000 (+0200) Subject: Initializing all struct by default to avoid errors X-Git-Tag: 5.0.2~129 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=commitdiff_plain;ds=sidebyside;h=c47d3c3b474b418d9471520517afd8c9e9893a39;p=apps%2Fagl-service-can-low-level.git Initializing all struct by default to avoid errors Change-Id: I54eab7da7e5819f633a5612abe46d44550068aab Signed-off-by: Romain Forlot --- 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) {