Skip to content

Commit

Permalink
Silence redundant Clang analyzer warning
Browse files Browse the repository at this point in the history
  • Loading branch information
giacomofiorin committed Sep 15, 2023
1 parent 7011be3 commit d4968f1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/colvarmodule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,9 @@ colvarmodule::colvarmodule(colvarproxy *proxy_in)
// set initial default values

binary_restart = false;
if (getenv("COLVARS_BINARY_RESTART") != nullptr) {
if (atoi(getenv("COLVARS_BINARY_RESTART"))) {
char const *env_var = getenv("COLVARS_BINARY_RESTART");
if (env_var) {
if (atoi(env_var ? env_var : "0")) {
binary_restart = true;
}
}
Expand Down

0 comments on commit d4968f1

Please sign in to comment.