mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-30 16:24:09 +03:00
Migrate from astyle to clang-format (#8464)
This commit is contained in:
committed by
Max Prokhorov
parent
46190b61f1
commit
19b7a29720
@ -35,23 +35,24 @@
|
||||
#include <WiFiClient.h>
|
||||
#include <include/ClientContext.h>
|
||||
|
||||
#include <netdb.h> // gethostbyname
|
||||
#include <netdb.h> // gethostbyname
|
||||
|
||||
err_t dns_gethostbyname(const char *hostname, ip_addr_t *addr, dns_found_callback found, void *callback_arg)
|
||||
err_t dns_gethostbyname(const char* hostname, ip_addr_t* addr, dns_found_callback found,
|
||||
void* callback_arg)
|
||||
{
|
||||
(void)callback_arg;
|
||||
(void)found;
|
||||
struct hostent* hbn = gethostbyname(hostname);
|
||||
if (!hbn)
|
||||
return ERR_TIMEOUT;
|
||||
addr->addr = *(uint32_t*)hbn->h_addr_list[0];
|
||||
return ERR_OK;
|
||||
(void)callback_arg;
|
||||
(void)found;
|
||||
struct hostent* hbn = gethostbyname(hostname);
|
||||
if (!hbn)
|
||||
return ERR_TIMEOUT;
|
||||
addr->addr = *(uint32_t*)hbn->h_addr_list[0];
|
||||
return ERR_OK;
|
||||
}
|
||||
|
||||
static struct tcp_pcb mock_tcp_pcb;
|
||||
tcp_pcb* tcp_new (void)
|
||||
tcp_pcb* tcp_new(void)
|
||||
{
|
||||
// this is useless
|
||||
// ClientContext is setting the source port and we don't care here
|
||||
return &mock_tcp_pcb;
|
||||
// this is useless
|
||||
// ClientContext is setting the source port and we don't care here
|
||||
return &mock_tcp_pcb;
|
||||
}
|
||||
|
Reference in New Issue
Block a user