diff options
| author | Bernard Xiong <[email protected]> | 2019-05-16 13:51:02 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2019-05-16 13:51:02 +0800 |
| commit | cd8ed012fc0d665e20be4d542ae8959dee960ee8 (patch) | |
| tree | 83c8d530fbbcc6117560fedc986605012735d180 | |
| parent | 9e8c5033df7f80e41e37e47fa24310f01b3d8a86 (diff) | |
| parent | 6b1f8d9155be25fa7237556ce26954f8ee870587 (diff) | |
Merge pull request #2695 from BernardXiong/remove_gnu99
remove gnu99 code
| -rw-r--r-- | bsp/amebaz/applications/smartconfig_app.c | 3 | ||||
| -rw-r--r-- | components/drivers/wlan/wlan_cfg.c | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/bsp/amebaz/applications/smartconfig_app.c b/bsp/amebaz/applications/smartconfig_app.c index 4302fe7937..582bbf5d98 100644 --- a/bsp/amebaz/applications/smartconfig_app.c +++ b/bsp/amebaz/applications/smartconfig_app.c @@ -69,6 +69,7 @@ static int rt_wlan_device_connetct(char *ssid, char *passwd) static void airkiss_send_notification(uint8_t random) { + int i; int sock = -1; int udpbufsize = 2; struct sockaddr_in UDPBCAddr, UDPBCServerAddr; @@ -102,7 +103,7 @@ static void airkiss_send_notification(uint8_t random) goto _exit; } - for (int i = 0; i <= 20; i++) + for (i = 0; i <= 20; i++) { int ret = sendto(sock, (char *)&random, 1, 0, (struct sockaddr *)&UDPBCAddr, sizeof(UDPBCAddr)); rt_thread_delay(10); diff --git a/components/drivers/wlan/wlan_cfg.c b/components/drivers/wlan/wlan_cfg.c index 43fed8e6e8..126cee40f5 100644 --- a/components/drivers/wlan/wlan_cfg.c +++ b/components/drivers/wlan/wlan_cfg.c @@ -55,9 +55,12 @@ static rt_uint16_t rt_wlan_cal_crc(rt_uint8_t *buff, int len) while (len--) { + int i; + wChar = *(buff++); wCRCin ^= (wChar << 8); - for (int i = 0; i < 8; i++) + + for (i = 0; i < 8; i++) { if (wCRCin & 0x8000) wCRCin = (wCRCin << 1) ^ wCPoly; |
