diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2024-09-13 10:59:52 +0200 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2024-09-26 16:52:18 +0200 |
commit | 4582c6cb76f4fc7f49025969aba7f8a29a797d64 (patch) | |
tree | f4a6f47e376368bfc240c7ad61c5b83834302c90 /src/buildtool/file_system/git_context.cpp | |
parent | f0d5b0423de0eb72cda0b5624ac28d72bf65cffd (diff) | |
download | justbuild-4582c6cb76f4fc7f49025969aba7f8a29a797d64.tar.gz |
Fix assignments in conditions
...proposed by clang-tidy.
Enable bugprone-assignment-in-if-condition check.
Diffstat (limited to 'src/buildtool/file_system/git_context.cpp')
-rw-r--r-- | src/buildtool/file_system/git_context.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/buildtool/file_system/git_context.cpp b/src/buildtool/file_system/git_context.cpp index 94fb3cef..4fc613a3 100644 --- a/src/buildtool/file_system/git_context.cpp +++ b/src/buildtool/file_system/git_context.cpp @@ -24,7 +24,8 @@ extern "C" { GitContext::GitContext() noexcept { #ifndef BOOTSTRAP_BUILD_TOOL - if (not(initialized_ = (git_libgit2_init() >= 0))) { + initialized_ = git_libgit2_init() >= 0; + if (not initialized_) { Logger::Log(LogLevel::Error, "initializing libgit2 failed"); } #endif |