diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2017-06-01 15:58:20 +0200 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2017-06-01 18:40:13 +0200 |
commit | c47d3c3b474b418d9471520517afd8c9e9893a39 (patch) | |
tree | 5fca4bcf473d33d6f5467afd5cdd53d34182807d /CAN-binder/low-can-binding/utils/socketcan.cpp | |
parent | f112d3368e1c06fc4b3246e5b9ff56e247722b79 (diff) |
Initializing all struct by default to avoid errors
Change-Id: I54eab7da7e5819f633a5612abe46d44550068aab
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'CAN-binder/low-can-binding/utils/socketcan.cpp')
-rw-r--r-- | CAN-binder/low-can-binding/utils/socketcan.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/CAN-binder/low-can-binding/utils/socketcan.cpp b/CAN-binder/low-can-binding/utils/socketcan.cpp index 1f7aaa6..3aa34d2 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) { |