mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
pkg/semtech_loramac: fix DEBUG message when payload is NULL
In function `_semtech_loramac_send` parameter `payload` can be NULL (that the case when scheduling an immediate TX, line 726). As DEBUG macro use printf, a %s parameter can't be NULL so we have to handle that case.
This commit is contained in:
parent
901513391a
commit
f5c9fef096
@ -82,7 +82,7 @@ typedef struct {
|
||||
static uint8_t _semtech_loramac_send(semtech_loramac_t *mac,
|
||||
uint8_t *payload, uint8_t len)
|
||||
{
|
||||
DEBUG("[semtech-loramac] send frame %s\n", (char *)payload);
|
||||
DEBUG("[semtech-loramac] send frame %s\n", payload ? (char *)payload : "(empty)");
|
||||
McpsReq_t mcpsReq;
|
||||
LoRaMacTxInfo_t txInfo;
|
||||
uint8_t dr = semtech_loramac_get_dr(mac);
|
||||
|
Loading…
Reference in New Issue
Block a user