fix: 将未定义小写"true","false"改为"TRUE","FALSE"。
【背景】 api_shell.c文件使用小写的true和false 却没有定义 [OHOS ERROR] ../../../kernel/liteos_m/components/net/lwip-2.1/porting/src/api_shell.c:342:25: error: 'false' undeclared (first use in this function) [OHOS ERROR] BOOL timeout_flag = false; 编译报错。 【修改方案】 1. 将未定义的 true,false改为已定义的宏TRUE,FALSE。 【影响】 对现有的产品编译不会有影响。 re #I43D20 Change-Id: If66adab35f2315d0caca2a487960be887567126b Signed-off-by: pef <cyd1997@126.com>
This commit is contained in:
parent
badf1e9557
commit
9819eb5676
|
@ -333,7 +333,7 @@ LWIP_STATIC int OsPingFunc(u32_t *parg)
|
|||
int ret = 0;
|
||||
u32_t intrvl;
|
||||
char *data_buf = NULL;
|
||||
BOOL timeout_flag = false;
|
||||
BOOL timeout_flag = FALSE;
|
||||
char buf[50];
|
||||
|
||||
u32_t destip = parg[0];
|
||||
|
@ -398,14 +398,14 @@ LWIP_STATIC int OsPingFunc(u32_t *parg)
|
|||
do {
|
||||
pfd.events = POLLIN;
|
||||
pfd.revents = 0;
|
||||
timeout_flag = false;
|
||||
timeout_flag = FALSE;
|
||||
ret = poll(&pfd, 1, LWIP_SHELL_CMD_PING_TIMEOUT);
|
||||
if (ret < 0) {
|
||||
perror("Ping: poll\n");
|
||||
goto FAILURE;
|
||||
} else if (ret == 0) {
|
||||
/* first type timeout event */
|
||||
timeout_flag = true;
|
||||
timeout_flag = TRUE;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -445,7 +445,7 @@ LWIP_STATIC int OsPingFunc(u32_t *parg)
|
|||
} while (timout_ms >= 0);
|
||||
|
||||
/* all timeout events are true timeout */
|
||||
if ((timout_ms < 0) || (timeout_flag == true)) {
|
||||
if ((timout_ms < 0) || (timeout_flag == TRUE)) {
|
||||
failed_cnt++;
|
||||
i++;
|
||||
PRINTK("\nPing: destination unreachable ...");
|
||||
|
|
Loading…
Reference in New Issue