diff --git a/include/netutils/esp8266.h b/include/netutils/esp8266.h index 2c8fccd80..dce247f31 100644 --- a/include/netutils/esp8266.h +++ b/include/netutils/esp8266.h @@ -37,8 +37,8 @@ * Pre-processor Definitions ****************************************************************************/ -#define lespSSID_SIZE 32 /* Number of character max of SSID (null char not included) */ -#define lespBSSID_SIZE 6 +#define LESP_SSID_SIZE 32 /* Number of character max of SSID (null char not included) */ +#define LESP_BSSID_SIZE 6 #define lespIP(x1,x2,x3,x4) ((x1) << 24 | (x2) << 16 | (x3) << 8 | (x4) << 0) @@ -66,8 +66,8 @@ typedef enum typedef struct { lesp_security_t security; - char ssid[lespSSID_SIZE + 1]; /* +1 for null char */ - uint8_t bssid[lespBSSID_SIZE]; + char ssid[LESP_SSID_SIZE + 1]; /* +1 for null char */ + uint8_t bssid[LESP_BSSID_SIZE]; int rssi; int channel; } lesp_ap_t; diff --git a/netutils/esp8266/esp8266.c b/netutils/esp8266/esp8266.c index ac64b4b2f..f015da85f 100644 --- a/netutils/esp8266/esp8266.c +++ b/netutils/esp8266/esp8266.c @@ -315,7 +315,7 @@ static lesp_socket_t *get_sock(int sockfd) if (((unsigned int)sockfd) >= SOCKET_NBR) { errno = EINVAL; - ninfo("Esp8266 invalid sockfd\n", sockfd); + ninfo("Esp8266 invalid sockfd %d\n", sockfd); return NULL; } @@ -2283,7 +2283,7 @@ int lesp_connect(int sockfd, FAR const struct sockaddr *addr, socklen_t addrlen) { int ret = 0; - const char *proto_str; + const char *proto_str = ""; lesp_socket_t *sock; struct sockaddr_in *in; unsigned short port;