Skip to content

Commit

Permalink
Fix dead code in script_fcdb_do_string
Browse files Browse the repository at this point in the history
Was a bit too optimistic when writing this one :)
See Coverity CID 1468899.
  • Loading branch information
lmoureaux committed Feb 5, 2022
1 parent 6ae7a03 commit 5288a36
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/scripting/script_fcdb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,13 +268,13 @@ bool script_fcdb_do_string(struct connection *caller, const char *str)
fcl_compat.output_fct = script_fcdb_cmd_reply;
fcl_compat.caller = caller;

return fcl->safe_script(str).valid();
auto result = fcl->safe_script(str).valid();

// Reset the changes.
fcl_compat.caller = save_caller;
fcl_compat.output_fct = save_output_fct;

return true;
return result;
}

/**
Expand Down

0 comments on commit 5288a36

Please sign in to comment.