Skip to content

Commit 01fd880

Browse files
author
Kimmo Vaisanen
committed
Fix Coverity warning
Fixed Coverity warning "stored value is overwritten before it can be used".
1 parent 10c269b commit 01fd880

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

features/lorawan/lorastack/mac/LoRaMac.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,7 +1102,6 @@ lorawan_status_t LoRaMac::schedule_tx(void)
11021102
{
11031103
lorawan_time_t dutyCycleTimeOff = 0;
11041104
channel_selection_params_t nextChan;
1105-
lorawan_status_t status = LORAWAN_STATUS_PARAMETER_INVALID;
11061105

11071106
if (_params.sys_params.max_duty_cycle == 255) {
11081107
return LORAWAN_STATUS_DEVICE_OFF;
@@ -1121,9 +1120,10 @@ lorawan_status_t LoRaMac::schedule_tx(void)
11211120
nextChan.joined = _is_nwk_joined;
11221121
nextChan.last_aggregate_tx_time = _params.timers.aggregated_last_tx_time;
11231122

1124-
status = _lora_phy.set_next_channel(&nextChan, &_params.channel,
1125-
&dutyCycleTimeOff,
1126-
&_params.timers.aggregated_timeoff);
1123+
lorawan_status_t status = _lora_phy.set_next_channel(&nextChan,
1124+
&_params.channel,
1125+
&dutyCycleTimeOff,
1126+
&_params.timers.aggregated_timeoff);
11271127
switch (status) {
11281128
case LORAWAN_STATUS_NO_CHANNEL_FOUND:
11291129
case LORAWAN_STATUS_NO_FREE_CHANNEL_FOUND:

0 commit comments

Comments
 (0)