summaryrefslogtreecommitdiffstats
path: root/low-can-binding
diff options
context:
space:
mode:
Diffstat (limited to 'low-can-binding')
-rw-r--r--low-can-binding/utils/socketcan.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/low-can-binding/utils/socketcan.cpp b/low-can-binding/utils/socketcan.cpp
index 71588a6e..b943d1d7 100644
--- a/low-can-binding/utils/socketcan.cpp
+++ b/low-can-binding/utils/socketcan.cpp
@@ -29,7 +29,9 @@ namespace utils
/// @brief Construct a default, invalid, socket.
socketcan_t::socketcan_t()
: socket_{INVALID_SOCKET}
- {}
+ {
+ ::memset(&tx_address_, 0, sizeof(tx_address_));
+ }
/// @brief Construct a socket by moving an existing one.
socketcan_t::socketcan_t(socketcan_t&& s)
@@ -94,4 +96,4 @@ namespace utils
{
return socket_;
}
-} \ No newline at end of file
+}