From 6e8a9065d92e8004a00411e449d2aa666b3eea5e Mon Sep 17 00:00:00 2001
From: Moe Jette <jette1@llnl.gov>
Date: Mon, 9 Jan 2006 20:12:54 +0000
Subject: [PATCH] Report error on update node request with bad state.

---
 src/scontrol/scontrol.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/scontrol/scontrol.c b/src/scontrol/scontrol.c
index a8249fac09e..8d782b1dcbd 100644
--- a/src/scontrol/scontrol.c
+++ b/src/scontrol/scontrol.c
@@ -1670,7 +1670,7 @@ _update_node (int argc, char *argv[])
 					state_val = (uint16_t) j;
 					break;
 				}
-				if (strcmp(node_state_string(j),"END") == 0) {
+				if (j == NODE_STATE_END) {
 					exit_code = 1;
 					fprintf(stderr, "Invalid input: %s\n", 
 						argv[i]);
@@ -1684,7 +1684,7 @@ _update_node (int argc, char *argv[])
 					fprintf (stderr, "\n");
 					goto done;
 				}
-			}	
+			}
 			node_msg.node_state = state_val;
 			update_cnt++;
 		}
-- 
GitLab