From 1e7fa19c5bfe3b89b3b1ae9728d8e59bd40d6450 Mon Sep 17 00:00:00 2001 From: Huang Wei Date: Fri, 25 Mar 2022 09:16:18 +0000 Subject: [PATCH] update zh-cn/contribute/OpenHarmony-c-cpp-secure-coding-guide.md. Signed-off-by: HW --- zh-cn/contribute/OpenHarmony-c-cpp-secure-coding-guide.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zh-cn/contribute/OpenHarmony-c-cpp-secure-coding-guide.md b/zh-cn/contribute/OpenHarmony-c-cpp-secure-coding-guide.md index 6807bac1c9..eb25d94f33 100644 --- a/zh-cn/contribute/OpenHarmony-c-cpp-secure-coding-guide.md +++ b/zh-cn/contribute/OpenHarmony-c-cpp-secure-coding-guide.md @@ -2447,7 +2447,7 @@ size_t pathSize = 0; pathSize = (size_t)PATH_MAX; -if (VerifyPathSize(pathSize) == true) { +if (VerifyPathSize(pathSize)) { canonicalFilename = (char *)malloc(pathSize); if (canonicalFilename == NULL) { @@ -2461,7 +2461,7 @@ if (realpathRes == NULL) { ... // 错误处理 } -if (VerifyFile(realpathRes) == false) { +if (VerifyFile(realpathRes)) { ... // 错误处理 } @@ -3101,7 +3101,7 @@ if (file == NULL) { } if (IS_ERR(file)) { - printk("Error occured while opening file %s, exiting ...\n", MY_FILE); + printk("Error occurred while opening file %s, exiting ...\n", MY_FILE); return 0; } -- GitLab