From 8809aaf8e3942e15317af22996989ed32ef5d76a Mon Sep 17 00:00:00 2001
From: Danny Auble <da@llnl.gov>
Date: Tue, 28 Dec 2010 18:53:05 +0000
Subject: [PATCH] fixed whitespace

---
 src/sview/admin_info.c  |   6 +-
 src/sview/config_info.c |   2 +-
 src/sview/node_info.c   | 333 ++++++++++++++++++++--------------------
 src/sview/part_info.c   |   6 +-
 src/sview/popups.c      |   6 +-
 src/sview/submit_info.c |   6 +-
 src/sview/sview.c       |   6 +-
 7 files changed, 183 insertions(+), 182 deletions(-)

diff --git a/src/sview/admin_info.c b/src/sview/admin_info.c
index 632b498e3fc..f59e6cceb79 100644
--- a/src/sview/admin_info.c
+++ b/src/sview/admin_info.c
@@ -103,13 +103,13 @@ extern void row_clicked_admin(GtkTreeView *tree_view,
 	GtkWidget *popup = NULL;
 	GtkWidget *label = NULL;
 	char *info = NULL;
-	if(line == -1) {
+	if (line == -1) {
 		g_error("problem getting line number");
 		return;
 	}
 
 /* 	part_ptr = &new_part_ptr->partition_array[line]; */
-	/* if(!(info = slurm_sprint_partition_info(part_ptr, 0))) { */
+	/* if (!(info = slurm_sprint_partition_info(part_ptr, 0))) { */
 /* 		info = xmalloc(100); */
 /* 		sprintf(info, "Problem getting partition info for %s",  */
 /* 			part_ptr->name); */
@@ -119,7 +119,7 @@ extern void row_clicked_admin(GtkTreeView *tree_view,
 
 	label = gtk_label_new(info);
 	gtk_box_pack_end(GTK_BOX(GTK_DIALOG(popup)->vbox),
-			   label, TRUE, TRUE, 0);
+			 label, TRUE, TRUE, 0);
 	xfree(info);
 	gtk_widget_show(label);
 
diff --git a/src/sview/config_info.c b/src/sview/config_info.c
index ca8d0226cd5..68b3f382ef0 100644
--- a/src/sview/config_info.c
+++ b/src/sview/config_info.c
@@ -59,7 +59,7 @@ extern int get_new_info_config(slurm_ctl_conf_info_msg_t **info_ptr)
 	}
 	g_ctl_info_ptr = new_ctl_ptr;
 
-	if(g_ctl_info_ptr && (*info_ptr != g_ctl_info_ptr))
+	if (g_ctl_info_ptr && (*info_ptr != g_ctl_info_ptr))
 		error_code = SLURM_SUCCESS;
 
 	*info_ptr = new_ctl_ptr;
diff --git a/src/sview/node_info.c b/src/sview/node_info.c
index e724d3323e0..7de54e74cc7 100644
--- a/src/sview/node_info.c
+++ b/src/sview/node_info.c
@@ -163,7 +163,7 @@ static void _layout_node_record(GtkTreeView *treeview,
 	int idle_cpus = node_ptr->cpus;
 	GtkTreeStore *treestore =
 		GTK_TREE_STORE(gtk_tree_view_get_model(treeview));
-	if(!treestore)
+	if (!treestore)
 		return;
 
 	add_display_treestore_line(update, treestore, &iter,
@@ -182,10 +182,10 @@ static void _layout_node_record(GtkTreeView *treeview,
 				     SELECT_NODEDATA_SUBCNT,
 				     NODE_STATE_ALLOCATED,
 				     &alloc_cpus);
-	if(cluster_flags & CLUSTER_FLAG_BG) {
-		if(!alloc_cpus
-		   && ((node_ptr->node_state & NODE_STATE_ALLOCATED)
-		       ||  (node_ptr->node_state & NODE_STATE_COMPLETING)))
+	if (cluster_flags & CLUSTER_FLAG_BG) {
+		if (!alloc_cpus
+		    && ((node_ptr->node_state & NODE_STATE_ALLOCATED)
+			||  (node_ptr->node_state & NODE_STATE_COMPLETING)))
 			alloc_cpus = node_ptr->cpus;
 		else
 			alloc_cpus *= cpus_per_node;
@@ -203,7 +203,7 @@ static void _layout_node_record(GtkTreeView *treeview,
 				     NODE_STATE_ERROR,
 				     &err_cpus);
 
-	if(cluster_flags & CLUSTER_FLAG_BG)
+	if (cluster_flags & CLUSTER_FLAG_BG)
 		err_cpus *= cpus_per_node;
 
 	idle_cpus -= err_cpus;
@@ -307,10 +307,10 @@ static void _update_node_record(sview_node_info_t *sview_node_info_ptr,
 				     SELECT_NODEDATA_SUBCNT,
 				     NODE_STATE_ALLOCATED,
 				     &alloc_cpus);
-	if(cluster_flags & CLUSTER_FLAG_BG) {
-		if(!alloc_cpus
-		   && (IS_NODE_ALLOCATED(node_ptr)
-		       || IS_NODE_COMPLETING(node_ptr)))
+	if (cluster_flags & CLUSTER_FLAG_BG) {
+		if (!alloc_cpus
+		    && (IS_NODE_ALLOCATED(node_ptr)
+			|| IS_NODE_COMPLETING(node_ptr)))
 			alloc_cpus = node_ptr->cpus;
 		else
 			alloc_cpus *= cpus_per_node;
@@ -327,7 +327,7 @@ static void _update_node_record(sview_node_info_t *sview_node_info_ptr,
 				     NODE_STATE_ERROR,
 				     &err_cpus);
 
-	if(cluster_flags & CLUSTER_FLAG_BG)
+	if (cluster_flags & CLUSTER_FLAG_BG)
 		err_cpus *= cpus_per_node;
 
 	idle_cpus -= err_cpus;
@@ -335,11 +335,11 @@ static void _update_node_record(sview_node_info_t *sview_node_info_ptr,
 	gtk_tree_store_set(treestore, iter, SORTID_ERR_CPUS,
 			   tmp_cnt, -1);
 
-	if(IS_NODE_DRAIN(node_ptr)) {
+	if (IS_NODE_DRAIN(node_ptr)) {
 		/* don't worry about mixed since the
 		   whole node is being drained. */
-	} else if((alloc_cpus && err_cpus)
-		  || (idle_cpus  && (idle_cpus != node_ptr->cpus))) {
+	} else if ((alloc_cpus && err_cpus)
+		   || (idle_cpus  && (idle_cpus != node_ptr->cpus))) {
 		node_ptr->node_state &= NODE_STATE_FLAGS;
 		node_ptr->node_state |= NODE_STATE_MIXED;
 	}
@@ -428,10 +428,10 @@ static void _update_info_node(List info_list, GtkTreeView *tree_view)
 	/* get the iter, or find out the list is empty goto add */
 	if (gtk_tree_model_get_iter(model, &iter, path)) {
 		/* make sure all the partitions are still here */
-		while(1) {
+		while (1) {
 			gtk_tree_store_set(GTK_TREE_STORE(model), &iter,
 					   SORTID_UPDATED, 0, -1);
-			if(!gtk_tree_model_iter_next(model, &iter)) {
+			if (!gtk_tree_model_iter_next(model, &iter)) {
 				break;
 			}
 		}
@@ -444,12 +444,12 @@ static void _update_info_node(List info_list, GtkTreeView *tree_view)
 			goto adding;
 		}
 
-		while(1) {
+		while (1) {
 			/* search for the node name and check to see if
 			   it is in the list */
 			gtk_tree_model_get(model, &iter, SORTID_NAME,
 					   &name, -1);
-			if(!strcmp(name, node_ptr->name)) {
+			if (!strcmp(name, node_ptr->name)) {
 				/* update with new info */
 				g_free(name);
 				_update_node_record(sview_node_info,
@@ -459,7 +459,7 @@ static void _update_info_node(List info_list, GtkTreeView *tree_view)
 			}
 			g_free(name);
 
-			if(!gtk_tree_model_iter_next(model, &iter)) {
+			if (!gtk_tree_model_iter_next(model, &iter)) {
 				break;
 			}
 		}
@@ -499,11 +499,11 @@ static void _display_info_node(List info_list,	popup_info_t *popup_win)
 	sview_node_info_t *sview_node_info = NULL;
 	int i = -1;
 
-	if(!spec_info->search_info->gchar_data) {
+	if (!spec_info->search_info->gchar_data) {
 		goto finished;
 	}
 need_refresh:
-	if(!spec_info->display_widget) {
+	if (!spec_info->display_widget) {
 		treeview = create_treeview_2cols_attach_to_table(
 			popup_win->table);
 		spec_info->display_widget =
@@ -517,7 +517,7 @@ need_refresh:
 	while ((sview_node_info = (sview_node_info_t*) list_next(itr))) {
 		node_ptr = sview_node_info->node_ptr;
 		i++;
-		if(!strcmp(node_ptr->name, name)) {
+		if (!strcmp(node_ptr->name, name)) {
 			change_grid_color(popup_win->grid_button_list,
 					  i, i, i, true, 0);
 			_layout_node_record(treeview, sview_node_info, update);
@@ -526,13 +526,13 @@ need_refresh:
 		}
 	}
 	list_iterator_destroy(itr);
-	if(!found) {
-		if(!popup_win->not_found) {
+	if (!found) {
+		if (!popup_win->not_found) {
 			char *temp;
 			GtkTreeIter iter;
 			GtkTreeModel *model = NULL;
 
-			if(cluster_flags & CLUSTER_FLAG_BG)
+			if (cluster_flags & CLUSTER_FLAG_BG)
 				temp = "BP NOT FOUND\n";
 			else
 				temp = "NODE NOT FOUND\n";
@@ -545,7 +545,7 @@ need_refresh:
 		}
 		popup_win->not_found = true;
 	} else {
-		if(popup_win->not_found) {
+		if (popup_win->not_found) {
 			popup_win->not_found = false;
 			gtk_widget_destroy(spec_info->display_widget);
 
@@ -583,7 +583,7 @@ static void _process_each_node(GtkTreeModel *model, GtkTreePath *path,
 	process_node_t *process_node = userdata;
 
 	gtk_tree_model_get(model, iter, process_node->node_col, &name, -1);
-	if(process_node->nodelist)
+	if (process_node->nodelist)
 		xstrfmtcat(process_node->nodelist, ",%s", name);
 	else
 		process_node->nodelist = xstrdup(name);
@@ -618,7 +618,7 @@ extern List create_node_info_list(node_info_msg_t *node_info_ptr,
 			goto update_color;
 	}
 
-	if(info_list)
+	if (info_list)
 		list_flush(info_list);
 	else
 		info_list = list_create(_node_info_list_del);
@@ -645,8 +645,8 @@ extern List create_node_info_list(node_info_msg_t *node_info_ptr,
 		sview_node_info_ptr->node_ptr = node_ptr;
 		sview_node_info_ptr->pos = i;
 
-		if(node_ptr->reason &&
-		   (node_ptr->reason_uid != NO_VAL) && node_ptr->reason_time) {
+		if (node_ptr->reason &&
+		    (node_ptr->reason_uid != NO_VAL) && node_ptr->reason_time) {
 			struct passwd *pw = NULL;
 
 			if ((pw=getpwuid(node_ptr->reason_uid)))
@@ -660,12 +660,12 @@ extern List create_node_info_list(node_info_msg_t *node_info_ptr,
 				"%s [%s@%s]", node_ptr->reason, user, time_str);
 		} else
 			sview_node_info_ptr->reason = xstrdup(node_ptr->reason);
-		if(node_ptr->boot_time) {
+		if (node_ptr->boot_time) {
 			slurm_make_time_str(&node_ptr->boot_time,
 					    time_str, sizeof(time_str));
 			sview_node_info_ptr->boot_time = xstrdup(time_str);
 		}
-		if(node_ptr->slurmd_start_time) {
+		if (node_ptr->slurmd_start_time) {
 			slurm_make_time_str(&node_ptr->slurmd_start_time,
 					    time_str, sizeof(time_str));
 			sview_node_info_ptr->slurmd_start_time =
@@ -687,21 +687,21 @@ extern int get_new_info_node(node_info_msg_t **info_ptr, int force)
 	static bool changed = 0;
 	static uint16_t last_flags = 0;
 
-	if(g_node_info_ptr && !force
-	   && ((now - last) < working_sview_config.refresh_delay)) {
-		if(*info_ptr != g_node_info_ptr)
+	if (g_node_info_ptr && !force
+	    && ((now - last) < working_sview_config.refresh_delay)) {
+		if (*info_ptr != g_node_info_ptr)
 			error_code = SLURM_SUCCESS;
 		*info_ptr = g_node_info_ptr;
-		if(changed)
+		if (changed)
 			error_code = SLURM_SUCCESS;
 		goto end_it;
 	}
 	last = now;
 
-	//if(working_sview_config.show_hidden)
+	//if (working_sview_config.show_hidden)
 	show_flags |= SHOW_ALL;
 	if (g_node_info_ptr) {
-		if(show_flags != last_flags)
+		if (show_flags != last_flags)
 			g_node_info_ptr->last_update = 0;
 		error_code = slurm_load_node(g_node_info_ptr->last_update,
 					     &new_node_ptr, show_flags);
@@ -723,10 +723,10 @@ extern int get_new_info_node(node_info_msg_t **info_ptr, int force)
 	last_flags = show_flags;
 	g_node_info_ptr = new_node_ptr;
 
-	if(g_node_info_ptr && (*info_ptr != g_node_info_ptr))
+	if (g_node_info_ptr && (*info_ptr != g_node_info_ptr))
 		error_code = SLURM_SUCCESS;
 
- 	if(new_node_ptr && new_node_ptr->node_array && changed) {
+ 	if (new_node_ptr && new_node_ptr->node_array && changed) {
 		int i;
 		node_info_t *node_ptr = NULL;
 		uint16_t err_cpus = 0, alloc_cpus = 0;
@@ -748,10 +748,10 @@ extern int get_new_info_node(node_info_msg_t **info_ptr, int force)
 				SELECT_NODEDATA_SUBCNT,
 				NODE_STATE_ALLOCATED,
 				&alloc_cpus);
-			if(cluster_flags & CLUSTER_FLAG_BG) {
-				if(!alloc_cpus
-				   && (IS_NODE_ALLOCATED(node_ptr)
-				       || IS_NODE_COMPLETING(node_ptr)))
+			if (cluster_flags & CLUSTER_FLAG_BG) {
+				if (!alloc_cpus
+				    && (IS_NODE_ALLOCATED(node_ptr)
+					|| IS_NODE_COMPLETING(node_ptr)))
 					alloc_cpus = node_ptr->cpus;
 				else
 					alloc_cpus *= cpus_per_node;
@@ -763,38 +763,38 @@ extern int get_new_info_node(node_info_msg_t **info_ptr, int force)
 				SELECT_NODEDATA_SUBCNT,
 				NODE_STATE_ERROR,
 				&err_cpus);
-			if(cluster_flags & CLUSTER_FLAG_BG)
+			if (cluster_flags & CLUSTER_FLAG_BG)
 				err_cpus *= cpus_per_node;
 
 			idle_cpus -= err_cpus;
 
-			if(IS_NODE_DRAIN(node_ptr)) {
+			if (IS_NODE_DRAIN(node_ptr)) {
 				/* don't worry about mixed since the
 				   whole node is being drained. */
 			} else if ((alloc_cpus && err_cpus) ||
 				   (idle_cpus &&
 				    (idle_cpus != node_ptr->cpus))) {
 				node_ptr->node_state &= NODE_STATE_FLAGS;
-				if(err_cpus)
+				if (err_cpus)
 					node_ptr->node_state
 						|= NODE_STATE_ERROR;
 
 				node_ptr->node_state |= NODE_STATE_MIXED;
-			} else if(err_cpus) {
+			} else if (err_cpus) {
 				node_ptr->node_state &= NODE_STATE_FLAGS;
 				node_ptr->node_state |= NODE_STATE_ERROR;
 			}
 
-/* 			if(alloc_cpus && err_cpus && !idle_cpus) { */
+/* 			if (alloc_cpus && err_cpus && !idle_cpus) { */
 /* 				node_ptr->node_state &= NODE_STATE_FLAGS; */
 /* 				node_ptr->node_state |= NODE_STATE_AE; */
-/* 			} else if(alloc_cpus && err_cpus && idle_cpus) { */
+/* 			} else if (alloc_cpus && err_cpus && idle_cpus) { */
 /* 				node_ptr->node_state &= NODE_STATE_FLAGS; */
 /* 				node_ptr->node_state |= NODE_STATE_AEI; */
-/* 			} else if(alloc_cpus && !err_cpus && idle_cpus) { */
+/* 			} else if (alloc_cpus && !err_cpus && idle_cpus) { */
 /* 				node_ptr->node_state &= NODE_STATE_FLAGS; */
 /* 				node_ptr->node_state |= NODE_STATE_AI; */
-/* 			} else if(!alloc_cpus && err_cpus && idle_cpus) { */
+/* 			} else if (!alloc_cpus && err_cpus && idle_cpus) { */
 /* 				node_ptr->node_state &= NODE_STATE_FLAGS; */
 /* 				node_ptr->node_state |= NODE_STATE_EI; */
 /* 			} */
@@ -828,7 +828,7 @@ extern int update_features_node(GtkDialog *dialog, const char *nodelist,
 		g_print("update_features_node:global_row_count: %d "
 			"node_names %s\n",
 			global_row_count, nodelist);
-	if(!dialog) {
+	if (!dialog) {
 		snprintf(tmp_char, sizeof(tmp_char),
 			 "Update Features for Node(s) %s?",
 			 nodelist);
@@ -858,10 +858,10 @@ extern int update_features_node(GtkDialog *dialog, const char *nodelist,
 			   label, FALSE, FALSE, 0);
 
 	entry = create_entry();
-	if(!entry)
+	if (!entry)
 		goto end_it;
 
-	if(old_features)
+	if (old_features)
 		gtk_entry_set_text(GTK_ENTRY(entry), old_features);
 
 	gtk_box_pack_start(GTK_BOX(dialog->vbox), entry, TRUE, TRUE, 0);
@@ -871,13 +871,13 @@ extern int update_features_node(GtkDialog *dialog, const char *nodelist,
 	if (response == GTK_RESPONSE_OK) {
 		node_msg->features =
 			xstrdup(gtk_entry_get_text(GTK_ENTRY(entry)));
-		if(!node_msg->features) {
+		if (!node_msg->features) {
 			edit = g_strdup_printf("No features given.");
 			display_edit_note(edit);
 			g_free(edit);
 			goto end_it;
 		}
-		if((rc = slurm_update_node(node_msg) == SLURM_SUCCESS)) {
+		if ((rc = slurm_update_node(node_msg) == SLURM_SUCCESS)) {
 			edit = g_strdup_printf(
 				"Node(s) %s updated successfully.",
 				nodelist);
@@ -895,7 +895,7 @@ extern int update_features_node(GtkDialog *dialog, const char *nodelist,
 
 end_it:
 	slurm_free_update_node_msg(node_msg);
-	if(no_dialog)
+	if (no_dialog)
 		gtk_widget_destroy(GTK_WIDGET(dialog));
 
 	return rc;
@@ -917,7 +917,7 @@ extern int update_gres_node(GtkDialog *dialog, const char *nodelist,
 		g_print("update_gres_node:global_row_count:"
 			" %d node_names %s\n",
 			global_row_count, nodelist);
-	if(!dialog) {
+	if (!dialog) {
 		snprintf(tmp_char, sizeof(tmp_char),
 			 "Update Gres for Node(s) %s?",
 			 nodelist);
@@ -944,10 +944,10 @@ extern int update_gres_node(GtkDialog *dialog, const char *nodelist,
 	gtk_box_pack_start(GTK_BOX(dialog->vbox), label, FALSE, FALSE, 0);
 
 	entry = create_entry();
-	if(!entry)
+	if (!entry)
 		goto end_it;
 
-	if(old_gres)
+	if (old_gres)
 		gtk_entry_set_text(GTK_ENTRY(entry), old_gres);
 
 	gtk_box_pack_start(GTK_BOX(dialog->vbox), entry, TRUE, TRUE, 0);
@@ -956,13 +956,13 @@ extern int update_gres_node(GtkDialog *dialog, const char *nodelist,
 	response = gtk_dialog_run(dialog);
 	if (response == GTK_RESPONSE_OK) {
 		node_msg->gres = xstrdup(gtk_entry_get_text(GTK_ENTRY(entry)));
-		if(!node_msg->gres) {
+		if (!node_msg->gres) {
 			edit = g_strdup_printf("No gres given.");
 			display_edit_note(edit);
 			g_free(edit);
 			goto end_it;
 		}
-		if((rc = slurm_update_node(node_msg)) == SLURM_SUCCESS) {
+		if ((rc = slurm_update_node(node_msg)) == SLURM_SUCCESS) {
 			edit = g_strdup_printf(
 				"Nodes %s updated successfully.",
 				nodelist);
@@ -979,7 +979,7 @@ extern int update_gres_node(GtkDialog *dialog, const char *nodelist,
 
 end_it:
 	slurm_free_update_node_msg(node_msg);
-	if(no_dialog)
+	if (no_dialog)
 		gtk_widget_destroy(GTK_WIDGET(dialog));
 
 	return rc;
@@ -998,7 +998,7 @@ extern int update_state_node(GtkDialog *dialog,
 	GtkWidget *entry = NULL;
 	int no_dialog = 0;
 
-	if(!dialog) {
+	if (!dialog) {
 		dialog = GTK_DIALOG(
 			gtk_dialog_new_with_buttons(
 				type,
@@ -1015,7 +1015,7 @@ extern int update_state_node(GtkDialog *dialog,
 	slurm_init_update_node_msg(node_msg);
 	node_msg->node_names = xstrdup(nodelist);
 
-	if(!strncasecmp("drain", type, 5)) {
+	if (!strncasecmp("drain", type, 5)) {
 		snprintf(tmp_char, sizeof(tmp_char),
 			 "Are you sure you want to drain node(s) %s?\n\n"
 			 "Please put reason.",
@@ -1023,21 +1023,21 @@ extern int update_state_node(GtkDialog *dialog,
 		entry = create_entry();
 		label = gtk_label_new(tmp_char);
 		state = NODE_STATE_DRAIN;
-	} else if(!strncasecmp("resume", type, 5)) {
+	} else if (!strncasecmp("resume", type, 5)) {
 		snprintf(tmp_char, sizeof(tmp_char),
 			 "Are you sure you want to resume node(s) %s?",
 			 nodelist);
 		label = gtk_label_new(tmp_char);
 		state = NODE_RESUME;
 	} else {
-		if(!strncasecmp("make", type, 4))
+		if (!strncasecmp("make", type, 4))
 			type = "idle";
-		else if(!strncasecmp("put", type, 3))
+		else if (!strncasecmp("put", type, 3))
 			type = "down";
 		for(i = 0; i < NODE_STATE_END; i++) {
 			upper = node_state_string(i);
 			lower = str_tolower(upper);
-			if(!strcmp(lower, type)) {
+			if (!strcmp(lower, type)) {
 				snprintf(tmp_char, sizeof(tmp_char),
 					 "Are you sure you want to set "
 					 "node(s) %s to %s?",
@@ -1050,19 +1050,19 @@ extern int update_state_node(GtkDialog *dialog,
 			xfree(lower);
 		}
 	}
-	if(!label)
+	if (!label)
 		goto end_it;
 	node_msg->node_state = (uint16_t)state;
 	gtk_box_pack_start(GTK_BOX(dialog->vbox), label, FALSE, FALSE, 0);
-	if(entry)
+	if (entry)
 		gtk_box_pack_start(GTK_BOX(dialog->vbox), entry, TRUE, TRUE, 0);
 	gtk_widget_show_all(GTK_WIDGET(dialog));
 	i = gtk_dialog_run(dialog);
 	if (i == GTK_RESPONSE_OK) {
-		if(entry) {
+		if (entry) {
 			node_msg->reason = xstrdup(
 				gtk_entry_get_text(GTK_ENTRY(entry)));
-			if(!node_msg->reason || !strlen(node_msg->reason)) {
+			if (!node_msg->reason || !strlen(node_msg->reason)) {
 				lower = g_strdup_printf(
 					"You need a reason to do that.");
 				display_edit_note(lower);
@@ -1074,7 +1074,7 @@ extern int update_state_node(GtkDialog *dialog,
 				node_msg->reason_uid = getuid();
 
 		}
-		if((rc = slurm_update_node(node_msg)) == SLURM_SUCCESS) {
+		if ((rc = slurm_update_node(node_msg)) == SLURM_SUCCESS) {
 			lower = g_strdup_printf(
 				"Nodes %s updated successfully.",
 				nodelist);
@@ -1090,7 +1090,7 @@ extern int update_state_node(GtkDialog *dialog,
 	}
 end_it:
 	slurm_free_update_node_msg(node_msg);
-	if(no_dialog)
+	if (no_dialog)
 		gtk_widget_destroy(GTK_WIDGET(dialog));
 
 	return rc;
@@ -1150,7 +1150,7 @@ extern void admin_edit_node(GtkCellRendererText *cell,
 	char *nodelist = NULL;
 	int column = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(cell),
 						       "column"));
-	if(!new_text || !strcmp(new_text, ""))
+	if (!new_text || !strcmp(new_text, ""))
 		goto no_input;
 
 	gtk_tree_model_get_iter(GTK_TREE_MODEL(treestore), &iter, path);
@@ -1195,35 +1195,35 @@ extern void get_info_node(GtkTable *table, display_data_t *display_data)
 	set_opts = TRUE;
 
 	/* reset */
-	if(!table && !display_data) {
-		if(display_widget)
+	if (!table && !display_data) {
+		if (display_widget)
 			gtk_widget_destroy(display_widget);
 		display_widget = NULL;
 		goto reset_curs;
 	}
 
-	if(display_data)
+	if (display_data)
 		local_display_data = display_data;
-	if(!table) {
+	if (!table) {
 		display_data_node->set_menu = local_display_data->set_menu;
 		goto reset_curs;
 	}
-	if(display_widget && toggled) {
+	if (display_widget && toggled) {
 		gtk_widget_destroy(display_widget);
 		display_widget = NULL;
 		goto display_it;
 	}
 
-	if((error_code = get_new_info_node(&node_info_ptr, force_refresh))
-	   == SLURM_NO_CHANGE_IN_DATA) {
-		if(!display_widget || view == ERROR_VIEW)
+	if ((error_code = get_new_info_node(&node_info_ptr, force_refresh))
+	    == SLURM_NO_CHANGE_IN_DATA) {
+		if (!display_widget || view == ERROR_VIEW)
 			goto display_it;
 		changed = 0;
 	} else if (error_code != SLURM_SUCCESS) {
-		if(view == ERROR_VIEW)
+		if (view == ERROR_VIEW)
 			goto end_it;
 		view = ERROR_VIEW;
-		if(display_widget)
+		if (display_widget)
 			gtk_widget_destroy(display_widget);
 		sprintf(error_char, "slurm_load_node: %s",
 			slurm_strerror(slurm_get_errno()));
@@ -1264,14 +1264,8 @@ display_it:
 					    node_state != NODE_STATE_IDLE )
 						b_color_ndx = i;
 				}
-			} else {
-				/* stop blasting out all those button colors */
-				/* if (sview_node_info_ptr->node_ptr->node_state */
-				/*     != NODE_STATE_IDLE) */
-					b_color_ndx = i;
-				/* else */
-				/* 	b_color_ndx = MAKE_INIT; */
-			}
+			} else
+				b_color_ndx = i;
 			change_grid_color(grid_button_list, i, i,
 					  b_color_ndx, true, 0);
 			i++;
@@ -1281,16 +1275,16 @@ display_it:
 		highlight_grid(GTK_TREE_VIEW(display_widget),
 			       SORTID_POS, (int)NO_VAL, grid_button_list);
 
-	if(working_sview_config.grid_speedup) {
+	if (working_sview_config.grid_speedup) {
 		gtk_widget_set_sensitive(GTK_WIDGET(main_grid_table), 0);
 		gtk_widget_set_sensitive(GTK_WIDGET(main_grid_table), 1);
 	}
 
-	if(view == ERROR_VIEW && display_widget) {
+	if (view == ERROR_VIEW && display_widget) {
 		gtk_widget_destroy(display_widget);
 		display_widget = NULL;
 	}
-	if(!display_widget) {
+	if (!display_widget) {
 		tree_view = create_treeview(local_display_data,
 					    &grid_button_list);
 		/*set multiple capability here*/
@@ -1338,26 +1332,26 @@ extern void specific_info_node(popup_info_t *popup_win)
 	int i = -1;
 	sview_search_info_t *search_info = spec_info->search_info;
 
-	if(!spec_info->display_widget)
+	if (!spec_info->display_widget)
 		setup_popup_info(popup_win, display_data_node, SORTID_CNT);
 
-	if(node_info_ptr && popup_win->toggled) {
+	if (node_info_ptr && popup_win->toggled) {
 		gtk_widget_destroy(spec_info->display_widget);
 		spec_info->display_widget = NULL;
 		goto display_it;
 	}
 
-	if((error_code = get_new_info_node(&node_info_ptr,
-					   popup_win->force_refresh))
-	   == SLURM_NO_CHANGE_IN_DATA) {
-		if(!spec_info->display_widget || spec_info->view == ERROR_VIEW)
+	if ((error_code = get_new_info_node(&node_info_ptr,
+					    popup_win->force_refresh))
+	    == SLURM_NO_CHANGE_IN_DATA) {
+		if (!spec_info->display_widget || spec_info->view == ERROR_VIEW)
 			goto display_it;
 		changed = 0;
-	} else if(error_code != SLURM_SUCCESS) {
-		if(spec_info->view == ERROR_VIEW)
+	} else if (error_code != SLURM_SUCCESS) {
+		if (spec_info->view == ERROR_VIEW)
 			goto end_it;
 		spec_info->view = ERROR_VIEW;
-		if(spec_info->display_widget)
+		if (spec_info->display_widget)
 			gtk_widget_destroy(spec_info->display_widget);
 		sprintf(error_char, "slurm_load_node: %s",
 			slurm_strerror(slurm_get_errno()));
@@ -1373,14 +1367,14 @@ display_it:
 
 	info_list = create_node_info_list(node_info_ptr, changed, FALSE);
 
-	if(!info_list)
+	if (!info_list)
 		return;
 
-	if(spec_info->view == ERROR_VIEW && spec_info->display_widget) {
+	if (spec_info->view == ERROR_VIEW && spec_info->display_widget) {
 		gtk_widget_destroy(spec_info->display_widget);
 		spec_info->display_widget = NULL;
 	}
-	if(spec_info->type != INFO_PAGE && !spec_info->display_widget) {
+	if (spec_info->type != INFO_PAGE && !spec_info->display_widget) {
 		tree_view = create_treeview(local_display_data,
 					    &popup_win->grid_button_list);
 		/*set multiple capability here*/
@@ -1402,7 +1396,7 @@ display_it:
 	setup_popup_grid_list(popup_win);
 
 	spec_info->view = INFO_VIEW;
-	if(spec_info->type == INFO_PAGE) {
+	if (spec_info->type == INFO_PAGE) {
 		_display_info_node(info_list, popup_win);
 		goto end_it;
 	}
@@ -1412,7 +1406,7 @@ display_it:
 	/* just linking to another list, don't free the inside, just
 	   the list */
 	send_info_list = list_create(NULL);
-	if(search_info->gchar_data) {
+	if (search_info->gchar_data) {
 		hostlist = hostlist_create(search_info->gchar_data);
 		host_itr = hostlist_iterator_create(hostlist);
 	}
@@ -1428,10 +1422,11 @@ display_it:
 
 		switch(search_info->search_type) {
 		case SEARCH_NODE_STATE:
-			if(search_info->int_data == NO_VAL)
+			if (search_info->int_data == NO_VAL)
 				continue;
-			else if(search_info->int_data != node_ptr->node_state) {
-				if(IS_NODE_MIXED(node_ptr)) {
+			else if (search_info->int_data
+				 != node_ptr->node_state) {
+				if (IS_NODE_MIXED(node_ptr)) {
 					uint16_t alloc_cnt = 0, err_cnt = 0;
 					uint16_t idle_cnt = node_ptr->cpus;
 					select_g_select_nodeinfo_get(
@@ -1445,20 +1440,20 @@ display_it:
 						NODE_STATE_ERROR,
 						&err_cnt);
 					idle_cnt -= (alloc_cnt + err_cnt);
-					if((search_info->int_data
-					    & NODE_STATE_BASE)
-					   == NODE_STATE_ALLOCATED) {
-						if(alloc_cnt)
+					if ((search_info->int_data
+					     & NODE_STATE_BASE)
+					    == NODE_STATE_ALLOCATED) {
+						if (alloc_cnt)
 							break;
-					} else if((search_info->int_data
-						   & NODE_STATE_BASE)
-						  == NODE_STATE_ERROR) {
-						if(err_cnt)
+					} else if ((search_info->int_data
+						    & NODE_STATE_BASE)
+						   == NODE_STATE_ERROR) {
+						if (err_cnt)
 							break;
-					} else if((search_info->int_data
-						   & NODE_STATE_BASE)
-						  == NODE_STATE_IDLE) {
-						if(idle_cnt)
+					} else if ((search_info->int_data
+						    & NODE_STATE_BASE)
+						   == NODE_STATE_IDLE) {
+						if (idle_cnt)
 							break;
 					}
 				}
@@ -1467,10 +1462,10 @@ display_it:
 			break;
 		case SEARCH_NODE_NAME:
 		default:
-			if(!search_info->gchar_data)
+			if (!search_info->gchar_data)
 				continue;
-			while((host = hostlist_next(host_itr))) {
-				if(!strcmp(host, node_ptr->name)) {
+			while ((host = hostlist_next(host_itr))) {
+				if (!strcmp(host, node_ptr->name)) {
 					free(host);
 					found = 1;
 					break;
@@ -1479,7 +1474,7 @@ display_it:
 			}
 			hostlist_iterator_reset(host_itr);
 
-			if(!found)
+			if (!found)
 				continue;
 			break;
 		}
@@ -1490,7 +1485,7 @@ display_it:
 	list_iterator_destroy(itr);
 	post_setup_popup_grid_list(popup_win);
 
-	if(search_info->gchar_data) {
+	if (search_info->gchar_data) {
 		hostlist_iterator_destroy(host_itr);
 		hostlist_destroy(hostlist);
 	}
@@ -1558,7 +1553,7 @@ extern void popup_all_node(GtkTreeModel *model, GtkTreeIter *iter, int id)
 	char *name = NULL;
 
 	gtk_tree_model_get(model, iter, SORTID_NAME, &name, -1);
-	if(_DEBUG)
+	if (_DEBUG)
 		g_print("popup_all_node: name = %s\n", name);
 	popup_all_node_name(name, id);
 	/* this name gets g_strdup'ed in the previous function */
@@ -1573,7 +1568,7 @@ extern void popup_all_node_name(char *name, int id)
 	GError *error = NULL;
 	char *node;
 
-	if(cluster_flags & CLUSTER_FLAG_BG)
+	if (cluster_flags & CLUSTER_FLAG_BG)
 		node = "Base partition";
 	else
 		node = "Node";
@@ -1602,16 +1597,16 @@ extern void popup_all_node_name(char *name, int id)
 	}
 
 	itr = list_iterator_create(popup_list);
-	while((popup_win = list_next(itr))) {
-		if(popup_win->spec_info)
-			if(!strcmp(popup_win->spec_info->title, title)) {
+	while ((popup_win = list_next(itr))) {
+		if (popup_win->spec_info)
+			if (!strcmp(popup_win->spec_info->title, title)) {
 				break;
 			}
 	}
 	list_iterator_destroy(itr);
 
-	if(!popup_win) {
-		if(id == INFO_PAGE)
+	if (!popup_win) {
+		if (id == INFO_PAGE)
 			popup_win = create_popup_info(id, NODE_PAGE, title);
 		else
 			popup_win = create_popup_info(NODE_PAGE, id, title);
@@ -1634,10 +1629,10 @@ extern void admin_menu_node_name(char *name, GdkEventButton *event)
 	display_data_t *display_data = options_data_node;
 	GtkWidget *menuitem;
 
-	while(display_data++) {
-		if(display_data->id == -1)
+	while (display_data++) {
+		if (display_data->id == -1)
 			break;
-		if(!display_data->name)
+		if (!display_data->name)
 			continue;
 
 		display_data->user_data = name;
@@ -1659,12 +1654,12 @@ extern void select_admin_nodes(GtkTreeModel *model,
 			       uint32_t node_col,
 			       GtkTreeView *treeview)
 {
-	if(treeview) {
+	if (treeview) {
 		char *old_value = NULL;
 		hostlist_t hl = NULL;
 		process_node_t process_node;
 		memset(&process_node, 0, sizeof(process_node_t));
-		if(node_col == NO_VAL)
+		if (node_col == NO_VAL)
 			process_node.node_col = SORTID_NAME;
 		else
 			process_node.node_col = node_col;
@@ -1679,11 +1674,11 @@ extern void select_admin_nodes(GtkTreeModel *model,
 		process_node.nodelist = hostlist_ranged_string_xmalloc(hl);
 		hostlist_destroy(hl);
 
-		if(!strcasecmp("Update Features", display_data->name)) {
+		if (!strcasecmp("Update Features", display_data->name)) {
 			/* get old features */
 			gtk_tree_model_get(model, iter, SORTID_FEATURES,
 					   &old_value, -1);
-		} else if(!strcasecmp("Update Gres", display_data->name)) {
+		} else if (!strcasecmp("Update Gres", display_data->name)) {
 			/* get old gres */
 			gtk_tree_model_get(model, iter, SORTID_GRES,
 					   &old_value, -1);
@@ -1691,7 +1686,7 @@ extern void select_admin_nodes(GtkTreeModel *model,
 		admin_node_name(process_node.nodelist, old_value,
 				display_data->name);
 		xfree(process_node.nodelist);
-		if(old_value)
+		if (old_value)
 			g_free(old_value);
 
 
@@ -1707,12 +1702,12 @@ extern void admin_node_name(char *name, char *old_value, char *type)
 		NULL);
 	gtk_window_set_transient_for(GTK_WINDOW(popup), NULL);
 
-	if(!strcasecmp("Update Features", type)
-	   || !strcasecmp("Update Node Features", type)
-	   || !strcasecmp("Update Base Partition Features",
-			  type)) { /* update features */
+	if (!strcasecmp("Update Features", type)
+	    || !strcasecmp("Update Node Features", type)
+	    || !strcasecmp("Update Base Partition Features",
+			   type)) { /* update features */
 		update_features_node(GTK_DIALOG(popup), name, old_value);
-	} else if(!strcasecmp("Update Gres", type)) { /* update gres */
+	} else if (!strcasecmp("Update Gres", type)) { /* update gres */
 		update_gres_node(GTK_DIALOG(popup), name, old_value);
 	} else /* something that has to deal with a node state change */
 		update_state_node(GTK_DIALOG(popup), name, type);
@@ -1725,24 +1720,24 @@ extern void admin_node_name(char *name, char *old_value, char *type)
 extern void cluster_change_node()
 {
 	display_data_t *display_data = options_data_node;
-	while(display_data++) {
-		if(display_data->id == -1)
+	while (display_data++) {
+		if (display_data->id == -1)
 			break;
-		if(cluster_flags & CLUSTER_FLAG_BG) {
+		if (cluster_flags & CLUSTER_FLAG_BG) {
 			switch(display_data->id) {
 			case BLOCK_PAGE:
 				display_data->name = "Blocks";
 				break;
 			}
 
-			if(!display_data->name) {
-			} else if(!strcmp(display_data->name, "Drain Node"))
+			if (!display_data->name) {
+			} else if (!strcmp(display_data->name, "Drain Node"))
 				display_data->name = "Drain Base Partition";
-			else if(!strcmp(display_data->name, "Resume Node"))
+			else if (!strcmp(display_data->name, "Resume Node"))
 				display_data->name = "Resume Base Partition";
-			else if(!strcmp(display_data->name, "Put Node Down"))
+			else if (!strcmp(display_data->name, "Put Node Down"))
 				display_data->name = "Put Base Partition Down";
-			else if(!strcmp(display_data->name, "Make Node Idle"))
+			else if (!strcmp(display_data->name, "Make Node Idle"))
 				display_data->name =
 					"Make Base Partition Idle";
 		} else {
@@ -1752,18 +1747,18 @@ extern void cluster_change_node()
 				break;
 			}
 
-			if(!display_data->name) {
-			} else if(!strcmp(display_data->name,
-					  "Drain Base Partitions"))
+			if (!display_data->name) {
+			} else if (!strcmp(display_data->name,
+					   "Drain Base Partitions"))
 				display_data->name = "Drain Nodes";
-			else if(!strcmp(display_data->name,
-					"Resume Base Partitions"))
+			else if (!strcmp(display_data->name,
+					 "Resume Base Partitions"))
 				display_data->name = "Resume Nodes";
-			else if(!strcmp(display_data->name,
-					"Put Base Partitions Down"))
+			else if (!strcmp(display_data->name,
+					 "Put Base Partitions Down"))
 				display_data->name = "Put Nodes Down";
-			else if(!strcmp(display_data->name,
-					"Make Base Partitions Idle"))
+			else if (!strcmp(display_data->name,
+					 "Make Base Partitions Idle"))
 				display_data->name = "Make Nodes Idle";
 		}
 	}
diff --git a/src/sview/part_info.c b/src/sview/part_info.c
index c1026112d95..6206b1ecd1d 100644
--- a/src/sview/part_info.c
+++ b/src/sview/part_info.c
@@ -1175,7 +1175,8 @@ static void _update_part_sub_record(sview_part_sub_t *sview_part_sub,
 	gtk_tree_store_set(treestore, iter, SORTID_NODE_STATE_NUM,
 			   sview_part_sub->node_state, -1);
 
-	if ((sview_part_sub->node_state & NODE_STATE_BASE) == NODE_STATE_MIXED) {
+	if ((sview_part_sub->node_state & NODE_STATE_BASE)
+	    == NODE_STATE_MIXED) {
 		if (sview_part_sub->cpu_alloc_cnt) {
 			convert_num_unit((float)sview_part_sub->cpu_alloc_cnt,
 					 tmp_cnt,
@@ -1403,7 +1404,8 @@ static void _update_sview_part_sub(sview_part_sub_t *sview_part_sub,
 		return;
 	}
 
-	if ((sview_part_sub->node_state & NODE_STATE_BASE) == NODE_STATE_MIXED) {
+	if ((sview_part_sub->node_state & NODE_STATE_BASE)
+	    == NODE_STATE_MIXED) {
 		slurm_get_select_nodeinfo(node_ptr->select_nodeinfo,
 					  SELECT_NODEDATA_SUBCNT,
 					  NODE_STATE_ALLOCATED,
diff --git a/src/sview/popups.c b/src/sview/popups.c
index 9098ce8102b..292b5c68dc4 100644
--- a/src/sview/popups.c
+++ b/src/sview/popups.c
@@ -812,7 +812,8 @@ extern void change_grid_popup(GtkAction *action, gpointer user_data)
 	 gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 3, 4);
 	 gtk_table_attach_defaults(GTK_TABLE(table), gtbtton, 1, 2, 3, 4);
 
-	 gtk_toggle_button_set_active (&gtbtton,working_sview_config.grid_topological);
+	 gtk_toggle_button_set_active (&gtbtton,
+                                       working_sview_config.grid_topological);
 	*/
 
 	gtk_widget_show_all(popup);
@@ -834,7 +835,8 @@ extern void change_grid_popup(GtkAction *action, gpointer user_data)
 			temp = g_strdup_printf("Grid: Nothing changed.");
 		} else if (working_sview_config.grid_topological) {
 			temp = g_strdup_printf("Grid: Invalid mode .."
-					       " switch to non-topology order first.");
+					       " switch to non-topology "
+					       "order first.");
 		} else {
 			bool refresh = 0;
 			temp = g_strdup_printf(
diff --git a/src/sview/submit_info.c b/src/sview/submit_info.c
index 088f28c8de8..3fd0fa3fb4d 100644
--- a/src/sview/submit_info.c
+++ b/src/sview/submit_info.c
@@ -105,13 +105,13 @@ extern void row_clicked_submit(GtkTreeView *tree_view,
 	GtkWidget *popup = NULL;
 	GtkWidget *label = NULL;
 	char *info = NULL;
-	if(line == -1) {
+	if (line == -1) {
 		g_error("problem getting line number");
 		return;
 	}
 
 /* 	part_ptr = &new_part_ptr->partition_array[line]; */
-	/* if(!(info = slurm_sprint_partition_info(part_ptr, 0))) { */
+	/* if (!(info = slurm_sprint_partition_info(part_ptr, 0))) { */
 /* 		info = xmalloc(100); */
 /* 		sprintf(info, "Problem getting partition info for %s",  */
 /* 			part_ptr->name); */
@@ -121,7 +121,7 @@ extern void row_clicked_submit(GtkTreeView *tree_view,
 
 	label = gtk_label_new(info);
 	gtk_box_pack_end(GTK_BOX(GTK_DIALOG(popup)->vbox),
-			   label, TRUE, TRUE, 0);
+			 label, TRUE, TRUE, 0);
 	xfree(info);
 	gtk_widget_show(label);
 
diff --git a/src/sview/sview.c b/src/sview/sview.c
index 8bf64ad0880..29f7fabcc45 100644
--- a/src/sview/sview.c
+++ b/src/sview/sview.c
@@ -859,11 +859,13 @@ static GtkWidget *_get_menubar_menu(GtkWidget *window, GtkWidget *notebook)
 		exit (0);
 	}
 	xfree(ui_description);
-	/* GList *action_list = gtk_action_group_list_actions(menu_action_group); */
+	/* GList *action_list = */
+	/* 	gtk_action_group_list_actions(menu_action_group); */
 	/* GtkAction *action = NULL; */
 	/* int i=0; */
 	/* while ((action = g_list_nth_data(action_list, i++))) { */
-	/* 	g_print("got %s and %x\n", gtk_action_get_name(action), action); */
+	/* 	g_print("got %s and %x\n", gtk_action_get_name(action), */
+	/* 		action); */
 	/* } */
 
 	/* Get the pointers to the correct action so if we ever need
-- 
GitLab