From 9819eb567636adf1774de9fd6039d274bee8f69b Mon Sep 17 00:00:00 2001 From: pef Date: Tue, 12 Oct 2021 10:41:02 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=B0=86=E6=9C=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E5=B0=8F=E5=86=99"true"=EF=BC=8C"false"=E6=94=B9=E4=B8=BA"TRUE?= =?UTF-8?q?"=EF=BC=8C"FALSE"=E3=80=82=20=20=20=20=20=E3=80=90=E8=83=8C?= =?UTF-8?q?=E6=99=AF=E3=80=91=20=20=20=20=20api=5Fshell.c=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E4=BD=BF=E7=94=A8=E5=B0=8F=E5=86=99=E7=9A=84true?= =?UTF-8?q?=E5=92=8Cfalse=20=E5=8D=B4=E6=B2=A1=E6=9C=89=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=20=20=20=20=20[OHOS=20ERROR]=20../../../kernel/liteos=5Fm/comp?= =?UTF-8?q?onents/net/lwip-2.1/porting/src/api=5Fshell.c:342:25:=20error:?= =?UTF-8?q?=20'false'=20undeclared=20(first=20use=20in=20this=20function)?= =?UTF-8?q?=20=20=20=20=20[OHOS=20ERROR]=20=20=20=20=20=20BOOL=20timeout?= =?UTF-8?q?=5Fflag=20=3D=20false;=20=20=20=20=20=E7=BC=96=E8=AF=91?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E3=80=82=20=20=20=20=20=E3=80=90=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=96=B9=E6=A1=88=E3=80=91=20=20=20=20=201.=20?= =?UTF-8?q?=E5=B0=86=E6=9C=AA=E5=AE=9A=E4=B9=89=E7=9A=84=20true,false?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E5=B7=B2=E5=AE=9A=E4=B9=89=E7=9A=84=E5=AE=8F?= =?UTF-8?q?TRUE=EF=BC=8CFALSE=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【影响】 对现有的产品编译不会有影响。 re #I43D20 Change-Id: If66adab35f2315d0caca2a487960be887567126b Signed-off-by: pef --- components/net/lwip-2.1/porting/src/api_shell.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/net/lwip-2.1/porting/src/api_shell.c b/components/net/lwip-2.1/porting/src/api_shell.c index 7db6560b..0df1b901 100644 --- a/components/net/lwip-2.1/porting/src/api_shell.c +++ b/components/net/lwip-2.1/porting/src/api_shell.c @@ -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 ...");