mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-26 03:16:18 +00:00
sntp_send_request: assert that argument 'server_addr' != NULL
This commit is contained in:
parent
ba270c2414
commit
82483073f0
@ -532,6 +532,9 @@ static void
|
|||||||
sntp_send_request(const ip_addr_t *server_addr)
|
sntp_send_request(const ip_addr_t *server_addr)
|
||||||
{
|
{
|
||||||
struct pbuf *p;
|
struct pbuf *p;
|
||||||
|
|
||||||
|
LWIP_ASSERT("server_addr != NULL", server_addr != NULL);
|
||||||
|
|
||||||
p = pbuf_alloc(PBUF_TRANSPORT, SNTP_MSG_LEN, PBUF_RAM);
|
p = pbuf_alloc(PBUF_TRANSPORT, SNTP_MSG_LEN, PBUF_RAM);
|
||||||
if (p != NULL) {
|
if (p != NULL) {
|
||||||
struct sntp_msg *sntpmsg = (struct sntp_msg *)p->payload;
|
struct sntp_msg *sntpmsg = (struct sntp_msg *)p->payload;
|
||||||
|
Loading…
Reference in New Issue
Block a user