From cf4fa1d10957fcfee9ac838f6e124931e6690fde Mon Sep 17 00:00:00 2001
From: "Christopher J. Morrone" <morrone2@llnl.gov>
Date: Fri, 25 Aug 2006 20:50:42 +0000
Subject: [PATCH] Change if/else order for readability

---
 src/api/step_launch.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/api/step_launch.c b/src/api/step_launch.c
index 00c6501abd8..c71d7b9587b 100644
--- a/src/api/step_launch.c
+++ b/src/api/step_launch.c
@@ -280,7 +280,9 @@ void slurm_step_launch_wait_finish(slurm_step_ctx ctx)
 	/* Wait for all tasks to complete */
 	pthread_mutex_lock(&sls->lock);
 	while (bit_set_count(sls->tasks_exited) < sls->tasks_requested) {
-		if (sls->abort) {
+		if (!sls->abort) {
+			pthread_cond_wait(&sls->cond, &sls->lock);
+		} else {
 			if (!sls->abort_action_taken) {
 				slurm_kill_job_step(ctx->job_id,
 						    ctx->step_resp->job_step_id,
@@ -322,8 +324,6 @@ void slurm_step_launch_wait_finish(slurm_step_ctx ctx)
 				client_io_handler_abort(sls->client_io);
 				break;
 			}
-		} else {
-			pthread_cond_wait(&sls->cond, &sls->lock);
 		}
 	}
 
-- 
GitLab