!346 【fix】api_shell.c 宏修改

Merge pull request !346 from pef/tocommit
This commit is contained in:
openharmony_ci 2021-10-19 01:52:10 +00:00 committed by Gitee
commit 4bc6a14914
1 changed files with 4 additions and 4 deletions

View File

@ -333,7 +333,7 @@ LWIP_STATIC int OsPingFunc(u32_t *parg)
int ret = 0; int ret = 0;
u32_t intrvl; u32_t intrvl;
char *data_buf = NULL; char *data_buf = NULL;
BOOL timeout_flag = false; BOOL timeout_flag = FALSE;
char buf[50]; char buf[50];
u32_t destip = parg[0]; u32_t destip = parg[0];
@ -398,14 +398,14 @@ LWIP_STATIC int OsPingFunc(u32_t *parg)
do { do {
pfd.events = POLLIN; pfd.events = POLLIN;
pfd.revents = 0; pfd.revents = 0;
timeout_flag = false; timeout_flag = FALSE;
ret = poll(&pfd, 1, LWIP_SHELL_CMD_PING_TIMEOUT); ret = poll(&pfd, 1, LWIP_SHELL_CMD_PING_TIMEOUT);
if (ret < 0) { if (ret < 0) {
perror("Ping: poll\n"); perror("Ping: poll\n");
goto FAILURE; goto FAILURE;
} else if (ret == 0) { } else if (ret == 0) {
/* first type timeout event */ /* first type timeout event */
timeout_flag = true; timeout_flag = TRUE;
break; break;
} }
@ -445,7 +445,7 @@ LWIP_STATIC int OsPingFunc(u32_t *parg)
} while (timout_ms >= 0); } while (timout_ms >= 0);
/* all timeout events are true timeout */ /* all timeout events are true timeout */
if ((timout_ms < 0) || (timeout_flag == true)) { if ((timout_ms < 0) || (timeout_flag == TRUE)) {
failed_cnt++; failed_cnt++;
i++; i++;
PRINTK("\nPing: destination unreachable ..."); PRINTK("\nPing: destination unreachable ...");