Skip to content
Snippets Groups Projects
Commit 05b0cda6 authored by Dominik Bartkiewicz's avatar Dominik Bartkiewicz Committed by Tim Wickberg
Browse files

Change _handle_job() return on error to -1

list_for_each() breaks only if rc < 0

Bug 10570
parent 9c238e49
No related branches found
No related tags found
No related merge requests found
...@@ -72,7 +72,7 @@ static int _handle_job(void *x, void *y) ...@@ -72,7 +72,7 @@ static int _handle_job(void *x, void *y)
if (!job->crontab_entry || !valid_cron_entry(job->crontab_entry)) { if (!job->crontab_entry || !valid_cron_entry(job->crontab_entry)) {
error("crontab submission failed due to missing or invalid cron_entry_t"); error("crontab submission failed due to missing or invalid cron_entry_t");
args->return_code = SLURM_ERROR; args->return_code = SLURM_ERROR;
return 1; return -1;
} }
/* /*
...@@ -102,7 +102,7 @@ static int _handle_job(void *x, void *y) ...@@ -102,7 +102,7 @@ static int _handle_job(void *x, void *y)
xstrfmtcat(*args->failed_lines, "%u-%u", xstrfmtcat(*args->failed_lines, "%u-%u",
((cron_entry_t *) job->crontab_entry)->line_start, ((cron_entry_t *) job->crontab_entry)->line_start,
((cron_entry_t *) job->crontab_entry)->line_end); ((cron_entry_t *) job->crontab_entry)->line_end);
return 1; return -1;
} }
args->return_code = job_allocate(job, 0, false, NULL, 0, args->uid, args->return_code = job_allocate(job, 0, false, NULL, 0, args->uid,
...@@ -122,7 +122,7 @@ static int _handle_job(void *x, void *y) ...@@ -122,7 +122,7 @@ static int _handle_job(void *x, void *y)
xstrfmtcat(*args->failed_lines, "%u-%u", xstrfmtcat(*args->failed_lines, "%u-%u",
((cron_entry_t *) job->crontab_entry)->line_start, ((cron_entry_t *) job->crontab_entry)->line_start,
((cron_entry_t *) job->crontab_entry)->line_end); ((cron_entry_t *) job->crontab_entry)->line_end);
return 1; return -1;
} else { } else {
xassert(job_ptr->details); xassert(job_ptr->details);
job_ptr->details->crontab_entry = job->crontab_entry; job_ptr->details->crontab_entry = job->crontab_entry;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment