From bc976c6545c6304e307728d86fc11338719a7308 Mon Sep 17 00:00:00 2001 From: Hasnain Virk Date: Fri, 21 Sep 2018 15:53:45 +0300 Subject: [PATCH] Fixing coverity findings A couple of the coverity analysis findings are being treated here. For the rest there will be a separate PR. --- features/lorawan/lorastack/mac/LoRaMac.cpp | 1 - features/lorawan/lorastack/phy/LoRaPHY.cpp | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/features/lorawan/lorastack/mac/LoRaMac.cpp b/features/lorawan/lorastack/mac/LoRaMac.cpp index 47bf516d75..c9cb2f67a0 100644 --- a/features/lorawan/lorastack/mac/LoRaMac.cpp +++ b/features/lorawan/lorastack/mac/LoRaMac.cpp @@ -1862,7 +1862,6 @@ uint8_t LoRaMac::get_max_possible_tx_size(uint8_t fopts_len) max_possible_payload_size = allowed_frm_payload_size - fopts_len; } else { max_possible_payload_size = allowed_frm_payload_size; - fopts_len = 0; _mac_commands.clear_command_buffer(); _mac_commands.clear_repeat_buffer(); } diff --git a/features/lorawan/lorastack/phy/LoRaPHY.cpp b/features/lorawan/lorastack/phy/LoRaPHY.cpp index 322446896c..6016401a6f 100644 --- a/features/lorawan/lorastack/phy/LoRaPHY.cpp +++ b/features/lorawan/lorastack/phy/LoRaPHY.cpp @@ -36,7 +36,8 @@ SPDX-License-Identifier: BSD-3-Clause #define CHANNELS_IN_MASK 16 LoRaPHY::LoRaPHY() - : _radio(NULL) + : _radio(NULL), + _lora_time(NULL) { memset(&phy_params, 0, sizeof(phy_params)); }