From ce019576adb63057ef2a09699a19bfc5ed9b5af6 Mon Sep 17 00:00:00 2001 From: Morris Jette <jette@schedmd.com> Date: Mon, 22 May 2017 15:23:21 -0600 Subject: [PATCH] Cosmetic changes No change in logic --- src/api/allocate.c | 6 +++--- src/salloc/salloc.c | 9 ++++----- src/slurmctld/agent.c | 2 +- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/api/allocate.c b/src/api/allocate.c index fe023570016..f898c1eb287 100644 --- a/src/api/allocate.c +++ b/src/api/allocate.c @@ -238,7 +238,7 @@ slurm_allocate_resources_blocking (const job_desc_msg_t *user_req, errnum = errno; } else { /* shouldn't get here */ - errnum = -1; + errnum = SLURM_ERROR; } break; case RESPONSE_RESOURCE_ALLOCATION: @@ -387,7 +387,7 @@ List slurm_allocate_pack_job_blocking(List job_req_list, time_t timeout, errnum = errno; } else { /* shouldn't get here */ - errnum = -1; + errnum = SLURM_ERROR; } break; #if 0 @@ -410,7 +410,7 @@ List slurm_allocate_pack_job_blocking(List job_req_list, time_t timeout, resp = _wait_for_allocation_response(job_id, listen, timeout); /* If NULL, we didn't get the allocation in - the time desired, so just free the job id */ + * the time desired, so just free the job id */ if ((resp == NULL) && (errno != ESLURM_ALREADY_DONE)) { errnum = errno; slurm_complete_job(job_id, -1); diff --git a/src/salloc/salloc.c b/src/salloc/salloc.c index b4a7d3316ed..86bbdc504dc 100644 --- a/src/salloc/salloc.c +++ b/src/salloc/salloc.c @@ -400,8 +400,7 @@ int main(int argc, char **argv) /* cancelled by signal */ info("Job aborted due to signal"); } else if (errno == EINTR) { - error("Interrupted by signal." - " Allocation request rescinded."); + error("Interrupted by signal. Allocation request rescinded."); } else if (opt.immediate && ((errno == ETIMEDOUT) || (errno == ESLURM_NOT_TOP_PRIORITY) || @@ -447,9 +446,9 @@ int main(int argc, char **argv) } after = time(NULL); - if (opt.bell == BELL_ALWAYS - || (opt.bell == BELL_AFTER_DELAY - && ((after - before) > DEFAULT_BELL_DELAY))) { + if ((opt.bell == BELL_ALWAYS) || + ((opt.bell == BELL_AFTER_DELAY) && + ((after - before) > DEFAULT_BELL_DELAY))) { _ring_terminal_bell(); } if (opt.no_shell) diff --git a/src/slurmctld/agent.c b/src/slurmctld/agent.c index 3b1708e557a..45e7c5c2931 100644 --- a/src/slurmctld/agent.c +++ b/src/slurmctld/agent.c @@ -990,7 +990,7 @@ static void *_thread_per_group_rpc(void *args) unlock_slurmctld(job_write_lock); continue; } else if ((msg_type == RESPONSE_RESOURCE_ALLOCATION) && - (rc == SLURM_COMMUNICATIONS_CONNECTION_ERROR)) { + (rc == SLURM_COMMUNICATIONS_CONNECTION_ERROR)) { /* Communication issue to srun that launched the job * Cancel rather than leave a stray-but-empty job * behind on the allocated nodes. */ -- GitLab