Skip to content

Commit

Permalink
jcr.h: remove JobTerminatedSuccessfully macro
Browse files Browse the repository at this point in the history
  • Loading branch information
alaaeddineelamri authored and pstorz committed May 30, 2023
1 parent d4db1c3 commit 5f1d377
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 2 additions & 2 deletions core/src/dird/job.cc
Expand Up @@ -335,7 +335,7 @@ bool SetupJob(JobControlRecord* jcr, bool suppress_output)

/* If there is nothing to do the DoMigrationInit() function will set
* the termination status to JS_Terminated. */
if (JobTerminatedSuccessfully(jcr)) {
if (jcr->IsTerminatedOk()) {
MigrationCleanup(jcr, jcr->getJobStatus());
goto bail_out;
}
Expand All @@ -348,7 +348,7 @@ bool SetupJob(JobControlRecord* jcr, bool suppress_output)

/* If there is nothing to do the do_consolidation_init() function will set
* the termination status to JS_Terminated. */
if (JobTerminatedSuccessfully(jcr)) {
if (jcr->IsTerminatedOk()) {
ConsolidateCleanup(jcr, jcr->getJobStatus());
goto bail_out;
}
Expand Down
5 changes: 1 addition & 4 deletions core/src/include/jcr.h
Expand Up @@ -68,9 +68,6 @@ struct CopyThreadContext;

typedef void(JCR_free_HANDLER)(JobControlRecord* jcr);

#define JobTerminatedSuccessfully(jcr) \
(jcr->getJobStatus() == JS_Terminated || jcr->getJobStatus() == JS_Warnings)

#define JobCanceled(jcr) \
(jcr->getJobStatus() == JS_Canceled \
|| jcr->getJobStatus() == JS_ErrorTerminated \
Expand Down Expand Up @@ -114,7 +111,7 @@ class JobControlRecord {
void DestroyMutex(void) { pthread_mutex_destroy(&mutex); }
bool IsJobCanceled() { return JobCanceled(this); }
bool IsCanceled() { return JobCanceled(this); }
bool IsTerminatedOk() { return JobTerminatedSuccessfully(this); }
bool IsTerminatedOk() { return JobStatus == JS_Terminated || JobStatus == JS_Warnings; }
bool IsIncomplete() { return JobStatus == JS_Incomplete; }
bool is_JobLevel(int32_t JobLevel) { return JobLevel == JobLevel_; }
bool is_JobType(int32_t JobType) { return JobType == JobType_; }
Expand Down

0 comments on commit 5f1d377

Please sign in to comment.