Code Review
/
apps
/
agl-service-can-low-level.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(from parent 1:
9bc0d4c
)
Initialize struct to avoid unexpected behavior
author
Romain Forlot
<romain.forlot@iot.bzh>
Thu, 7 Dec 2017 11:41:03 +0000
(12:41 +0100)
committer
Romain Forlot
<romain.forlot@iot.bzh>
Thu, 7 Dec 2017 11:41:03 +0000
(12:41 +0100)
Change-Id: I8c160b427f0844e9bc6c7e65fb48cd122160bc65
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
low-can-binding/utils/socketcan.cpp
patch
|
blob
|
history
diff --git
a/low-can-binding/utils/socketcan.cpp
b/low-can-binding/utils/socketcan.cpp
index
71588a6
..
b943d1d
100644
(file)
--- 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
+}