From a81c213cce345f219fc009b988a0127f8eea901c Mon Sep 17 00:00:00 2001
From: Danny Auble <da@llnl.gov>
Date: Wed, 20 May 2009 17:15:33 +0000
Subject: [PATCH] reoder check for slightly faster init of header

---
 src/common/slurm_protocol_util.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/common/slurm_protocol_util.c b/src/common/slurm_protocol_util.c
index 424d6275ec4..73bda87537b 100644
--- a/src/common/slurm_protocol_util.c
+++ b/src/common/slurm_protocol_util.c
@@ -83,12 +83,12 @@ void init_header(header_t *header, slurm_msg_t *msg,
 	   || msg->msg_type == ACCOUNTING_FIRST_REG) {
 		uint32_t rpc_version =
 			((accounting_update_msg_t *)msg->data)->rpc_version;
-		if(rpc_version < 5)
-			header->version = SLURM_1_3_PROTOCOL_VERSION;
-		else if(rpc_version < 6)
-			header->version = SLURM_2_0_PROTOCOL_VERSION;
-		else if(rpc_version >= 6)
+		if(rpc_version >= 6)
 			header->version = SLURM_PROTOCOL_VERSION;
+		else if(rpc_version >= 5)
+			header->version = SLURM_2_0_PROTOCOL_VERSION;
+		else
+			header->version = SLURM_1_3_PROTOCOL_VERSION;
 	} else 
 		header->version = SLURM_PROTOCOL_VERSION;
 	
-- 
GitLab