Skip to content

Commit

Permalink
examples/can: TX and RX structs assigned 0 at startup
Browse files Browse the repository at this point in the history
  • Loading branch information
eren-terzioglu authored and xiaoxiang781216 committed Sep 28, 2023
1 parent ddaa141 commit 85eb37c
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions examples/can/can_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,11 @@ int main(int argc, FAR char *argv[])
struct canioc_bittiming_s bt;

#ifdef CONFIG_EXAMPLES_CAN_WRITE
struct can_msg_s txmsg;
struct can_msg_s txmsg =
{
0
};

#ifdef CONFIG_CAN_EXTID
bool extended = true;
uint32_t msgid;
Expand All @@ -154,7 +158,11 @@ int main(int argc, FAR char *argv[])
int i;

#ifdef CONFIG_EXAMPLES_CAN_READ
struct can_msg_s rxmsg;
struct can_msg_s rxmsg =
{
0
};

#endif

size_t msgsize;
Expand Down

0 comments on commit 85eb37c

Please sign in to comment.