Skip to content

Commit

Permalink
Fix coverity detected problem.
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco van Wieringen committed Sep 10, 2015
1 parent afb0847 commit 4b856a0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/cats/sql_list.c
Expand Up @@ -445,11 +445,13 @@ void db_list_job_records(JCR *jcr, B_DB *mdb, JOB_DBR *jr, const char *range,
} else { /* all records */
if (jobstatus) {
jobstatusfilter.bsprintf(" WHERE JobStatus = '%c'", jobstatus);
} else if (jobstatus && since_time) {
schedtimefilter.bsprintf(" AND SchedTime > '%s' ", dt);
if (since_time) {
schedtimefilter.bsprintf(" AND SchedTime > '%s' ", dt);
}
} else if (since_time) {
schedtimefilter.bsprintf(" WHERE SchedTime > '%s' ", dt);
}

Mmsg(mdb->cmd,
"SELECT JobId,Name,StartTime,Type,Level,JobFiles,JobBytes,JobStatus "
"FROM Job %s %s ORDER BY JobId ASC%s",
Expand Down

0 comments on commit 4b856a0

Please sign in to comment.