Skip to content

Commit 5d35b66

Browse files
tedd-angalak
authored andcommitted
Samples: net: can: initialize the variables
Initialize the variables. Fix Bug: #14819 Coverity CID: 196637 Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com>
1 parent f1741da commit 5d35b66

File tree

1 file changed

+2
-2
lines changed
  • samples/net/sockets/can/src

1 file changed

+2
-2
lines changed

samples/net/sockets/can/src/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ static struct k_thread tx_data;
2323
static void tx(int *can_fd)
2424
{
2525
int fd = POINTER_TO_INT(can_fd);
26-
struct zcan_frame msg;
27-
struct can_frame frame;
26+
struct zcan_frame msg = {0};
27+
struct can_frame frame = {0};
2828
int ret, i;
2929

3030
msg.dlc = 8;

0 commit comments

Comments
 (0)