This is an automated email from the ASF dual-hosted git repository. pengzheng pushed a commit to branch hotfix/coverity_fix in repository https://gitbox.apache.org/repos/asf/celix.git
commit 882bce143d4f67cfcefdfaed7a2bbb88040d45e5 Author: PengZheng <[email protected]> AuthorDate: Mon Apr 10 16:16:27 2023 +0800 Revert "Eliminate false positive coverity warning (CID=313586)." This reverts commit 180bd1d3ad63ceee91716a6aee4be9079b01ad71. --- libs/utils/src/celix_file_utils.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libs/utils/src/celix_file_utils.c b/libs/utils/src/celix_file_utils.c index f8bb12fc..dcfd6b70 100644 --- a/libs/utils/src/celix_file_utils.c +++ b/libs/utils/src/celix_file_utils.c @@ -129,11 +129,10 @@ celix_status_t celix_utils_createDirectory(const char* path, bool failIfPresent, if (*p == '/') { /* Temporarily truncate */ *p = '\0'; - result = maybe_mkdir(_path, S_IRWXU); - *p = '/'; - if (result != 0) { + if (maybe_mkdir(_path, S_IRWXU) != 0) { goto out; } + *p = '/'; } } if (maybe_mkdir(_path, S_IRWXU) != 0) {
