Skip to content

Commit

Permalink
Use StringEqual() instead of strcmp() == 0 in cf-execd/execd-config.c
Browse files Browse the repository at this point in the history
Ticket: ENT-6735
Changelog: None
  • Loading branch information
vpodzime committed Feb 24, 2021
1 parent 040af13 commit 9aa9e42
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cf-execd/execd-config.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,18 +81,18 @@ ExecdConfig *ExecdConfigNew(const EvalContext *ctx, const Policy *policy)
cp->lval);
}

if (strcmp(cp->lval, CFEX_CONTROLBODY[EXEC_CONTROL_EXECUTORFACILITY].lval) == 0)
if (StringEqual(cp->lval, CFEX_CONTROLBODY[EXEC_CONTROL_EXECUTORFACILITY].lval))
{
free(execd_config->log_facility);
execd_config->log_facility = xstrdup(value);
Log(LOG_LEVEL_DEBUG, "executorfacility '%s'", execd_config->log_facility);
}
else if (strcmp(cp->lval, CFEX_CONTROLBODY[EXEC_CONTROL_SPLAYTIME].lval) == 0)
else if (StringEqual(cp->lval, CFEX_CONTROLBODY[EXEC_CONTROL_SPLAYTIME].lval))
{
int time = IntFromString(value);
execd_config->splay_time = (int) (time * SECONDS_PER_MINUTE * GetSplay());
}
else if (strcmp(cp->lval, CFEX_CONTROLBODY[EXEC_CONTROL_SCHEDULE].lval) == 0)
else if (StringEqual(cp->lval, CFEX_CONTROLBODY[EXEC_CONTROL_SCHEDULE].lval))
{
Log(LOG_LEVEL_DEBUG, "Loading user-defined schedule...");
StringSetClear(execd_config->schedule);
Expand Down

0 comments on commit 9aa9e42

Please sign in to comment.