aboutsummaryrefslogtreecommitdiffstats
path: root/low-can-binding
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-07-05 18:36:30 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-07-05 18:36:30 +0200
commit5124dc3dbf5df73529bd79d6457ee19148390e3c (patch)
treebc63051802ddbf50fb46aa1b7149d82adfcc047c /low-can-binding
parent61850844fb8213d316fa2d356219d47079cf7fe5 (diff)
Fix: uninitialized variables.
Change-Id: I1e506f225ce6f17836708c32106ce45c80150ee6 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'low-can-binding')
-rw-r--r--low-can-binding/can/can-message.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/low-can-binding/can/can-message.cpp b/low-can-binding/can/can-message.cpp
index fe66936..8221e30 100644
--- a/low-can-binding/can/can-message.cpp
+++ b/low-can-binding/can/can-message.cpp
@@ -189,7 +189,7 @@ void can_message_t::set_format(const can_message_format_t new_format)
/// @return A can_message_t object fully initialized with canfd_frame values.
can_message_t can_message_t::convert_from_frame(const struct canfd_frame& frame, size_t nbytes, uint64_t timestamp)
{
- uint8_t maxdlen, length, flags = (uint8_t)NULL;
+ uint8_t maxdlen = 0, length = 0, flags = 0;
uint32_t id;
can_message_format_t format;
bool rtr_flag;
@@ -277,7 +277,7 @@ can_message_t can_message_t::convert_from_frame(const struct canfd_frame& frame,
/// @return A can_message_t object fully initialized with can_frame values.
can_message_t can_message_t::convert_from_frame(const struct can_frame& frame, size_t nbytes, uint64_t timestamp)
{
- uint8_t maxdlen, length, flags = (uint8_t)NULL;
+ uint8_t maxdlen = 0, length = 0, flags = 0;
uint32_t id;
can_message_format_t format;
bool rtr_flag;