Lora-net / SWL2001

LoRa Basics Modem LoRaWAN stack
BSD 3-Clause Clear License
104 stars 60 forks source link

Variable user_alarm_in_seconds will never be negative in modem_supervisor_engine #26

Closed EduardoPfeifer closed 5 months ago

EduardoPfeifer commented 10 months ago

The var user_alarm_in_seconds will never be negative in modem_supervisor_engine because is unsigned.

https://github.com/Lora-net/SWL2001/blob/c4f386ac54b3e35f45b8ba7502207faa6f634921/smtc_modem_core/modem_supervisor/modem_supervisor_light.c#L294-L303

Here the type of user_alarm_in_seconds is signed https://github.com/Lora-net/SWL2001/blob/c4f386ac54b3e35f45b8ba7502207faa6f634921/smtc_modem_core/modem_supervisor/modem_supervisor_light.c#L336-L354