netutils/esp8266: Fix compile error
Fix compile error.
Signed-off-by: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com>
diff --git a/include/netutils/esp8266.h b/include/netutils/esp8266.h
index 2c8fccd..dce247f 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 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 ac64b4b..f015da8 100644
--- a/netutils/esp8266/esp8266.c
+++ b/netutils/esp8266/esp8266.c
@@ -315,7 +315,7 @@
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 @@
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;