From 16b0f0b51b6582223ff67669a6beb860beebb66d Mon Sep 17 00:00:00 2001 From: Huang Wei Date: Fri, 25 Mar 2022 09:18:07 +0000 Subject: [PATCH] update en/contribute/OpenHarmony-c-cpp-secure-coding-guide.md. Signed-off-by: HW --- en/contribute/OpenHarmony-c-cpp-secure-coding-guide.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/en/contribute/OpenHarmony-c-cpp-secure-coding-guide.md b/en/contribute/OpenHarmony-c-cpp-secure-coding-guide.md index e5bcc1db91..e4c1422424 100644 --- a/en/contribute/OpenHarmony-c-cpp-secure-coding-guide.md +++ b/en/contribute/OpenHarmony-c-cpp-secure-coding-guide.md @@ -2383,7 +2383,7 @@ size_t pathSize = 0; pathSize = (size_t)PATH_MAX; -if (VerifyPathSize(pathSize) == true) { +if (VerifyPathSize(pathSize)) { canonicalFilename = (char *)malloc(pathSize); if (canonicalFilename == NULL) { @@ -2397,7 +2397,7 @@ if (realpathRes == NULL) { ... // Error handling } -if (VerifyFile(realpathRes) == false) { +if (VerifyFile(realpathRes)) { ... // Error handling } @@ -3030,7 +3030,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