From b46b24b34f35b0b8837588da2f42dbcd4ad62fb4 Mon Sep 17 00:00:00 2001 From: smlng <s@mlng.net> Date: Thu, 22 Feb 2018 19:12:41 +0100 Subject: [PATCH] sys/can: init variables before usage --- sys/can/device.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/can/device.c b/sys/can/device.c index 5ff7b72ce8..6e58c60981 100644 --- a/sys/can/device.c +++ b/sys/can/device.c @@ -473,11 +473,10 @@ int can_device_calc_bittiming(uint32_t clock, const struct can_bittiming_const * uint32_t spt_error; uint32_t min_spt_error = UINT32_MAX; uint32_t best_brp = 0; - uint32_t tseg; - uint32_t tseg1; - uint32_t tseg2; + uint32_t tseg = 0; + uint32_t tseg1 = 0; + uint32_t tseg2 = 0; uint32_t best_tseg = 0; - uint32_t rate; /* current bitrate */ uint32_t rate_error; uint32_t min_rate_error; -- GitLab