Initializing all struct by default to avoid errors
authorRomain Forlot <romain.forlot@iot.bzh>
Thu, 1 Jun 2017 13:58:20 +0000 (15:58 +0200)
committerRomain Forlot <romain.forlot@iot.bzh>
Thu, 1 Jun 2017 16:40:13 +0000 (18:40 +0200)
Change-Id: I54eab7da7e5819f633a5612abe46d44550068aab
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
CAN-binder/low-can-binding/utils/socketcan.cpp

index 1f7aaa6..3aa34d2 100644 (file)
@@ -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)
        {