mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Fix clang-tidy bugprone-assignment-in-if-condition warnings
This commit is contained in:
parent
8ce741a7a8
commit
92854e95d3
10 changed files with 28 additions and 25 deletions
|
@ -66,8 +66,8 @@ TEST_CASE("module_util normalized_module_name") {
|
|||
}
|
||||
|
||||
string normalized_module_name(const char* module_name) {
|
||||
int mod_len;
|
||||
if ( (mod_len = strlen(module_name)) >= 2 && streq(module_name + mod_len - 2, "::") )
|
||||
int mod_len = strlen(module_name);
|
||||
if ( (mod_len >= 2) && streq(module_name + mod_len - 2, "::") != 0 )
|
||||
mod_len -= 2;
|
||||
|
||||
return {module_name, static_cast<size_t>(mod_len)};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue