diff --git a/src/plugins/select/bluegene/block_allocator/block_allocator.c b/src/plugins/select/bluegene/block_allocator/block_allocator.c
index 546220b761c022b352c497c5919d8341f7d3df93..1c267e547df64ef5ff26991b973e791ec9c51a06 100644
--- a/src/plugins/select/bluegene/block_allocator/block_allocator.c
+++ b/src/plugins/select/bluegene/block_allocator/block_allocator.c
@@ -219,16 +219,16 @@ static int _coord(char coord);
 extern char *ba_passthroughs_string(uint16_t passthrough)
 {
 	char *pass = NULL;
-	if(passthrough & PASS_FOUND_X)
+	if (passthrough & PASS_FOUND_X)
 		xstrcat(pass, "X");
-	if(passthrough & PASS_FOUND_Y) {
-		if(pass)
+	if (passthrough & PASS_FOUND_Y) {
+		if (pass)
 			xstrcat(pass, ",Y");
 		else
 			xstrcat(pass, "Y");
 	}
-	if(passthrough & PASS_FOUND_Z) {
-		if(pass)
+	if (passthrough & PASS_FOUND_Z) {
+		if (pass)
 			xstrcat(pass, ",Z");
 		else
 			xstrcat(pass, "Z");
@@ -269,7 +269,7 @@ extern int parse_blockreq(void **dest, slurm_parser_enum_t type,
 
 	tbl = s_p_hashtbl_create(block_options);
 	s_p_parse_line(tbl, *leftover, leftover);
-	if(!value) {
+	if (!value) {
 		return 0;
 	}
 	n = xmalloc(sizeof(blockreq_t));
@@ -289,7 +289,7 @@ extern int parse_blockreq(void **dest, slurm_parser_enum_t type,
 	s_p_get_string(&tmp, "Type", tbl);
 	if (!tmp || !strcasecmp(tmp,"TORUS"))
 		n->conn_type = SELECT_TORUS;
-	else if(!strcasecmp(tmp,"MESH"))
+	else if (!strcasecmp(tmp,"MESH"))
 		n->conn_type = SELECT_MESH;
 	else
 		n->conn_type = SELECT_SMALL;
@@ -325,7 +325,7 @@ extern int parse_blockreq(void **dest, slurm_parser_enum_t type,
 extern void destroy_blockreq(void *ptr)
 {
 	blockreq_t *n = (blockreq_t *)ptr;
-	if(n) {
+	if (n) {
 		xfree(n->block);
 #ifdef HAVE_BGL
 		xfree(n->blrtsimage);
@@ -357,20 +357,20 @@ extern int parse_image(void **dest, slurm_parser_enum_t type,
 	n = xmalloc(sizeof(image_t));
 	n->name = xstrdup(value);
 	n->def = false;
-	if(ba_debug_flags & DEBUG_FLAG_BG_ALGO)
+	if (ba_debug_flags & DEBUG_FLAG_BG_ALGO)
 		info("image %s", n->name);
 	n->groups = list_create(destroy_image_group_list);
 	s_p_get_string(&tmp, "Groups", tbl);
-	if(tmp) {
+	if (tmp) {
 		for(i=0; i<strlen(tmp); i++) {
-			if((tmp[i] == ':') || (tmp[i] == ',')) {
+			if ((tmp[i] == ':') || (tmp[i] == ',')) {
 				image_group = xmalloc(sizeof(image_group_t));
 				image_group->name = xmalloc(i-j+2);
 				snprintf(image_group->name,
 					 (i-j)+1, "%s", tmp+j);
 				gid_from_string (image_group->name,
 						 &image_group->gid);
-				if(ba_debug_flags & DEBUG_FLAG_BG_ALGO)
+				if (ba_debug_flags & DEBUG_FLAG_BG_ALGO)
 					info("adding group %s %d",
 					     image_group->name,
 					     image_group->gid);
@@ -379,7 +379,7 @@ extern int parse_image(void **dest, slurm_parser_enum_t type,
 				j++;
 			}
 		}
-		if(j != i) {
+		if (j != i) {
 			image_group = xmalloc(sizeof(image_group_t));
 			image_group->name = xmalloc(i-j+2);
 			snprintf(image_group->name, (i-j)+1, "%s", tmp+j);
@@ -388,7 +388,7 @@ extern int parse_image(void **dest, slurm_parser_enum_t type,
 				fatal("Invalid bluegene.conf parameter "
 				      "Groups=%s",
 				      image_group->name);
-			else if(ba_debug_flags & DEBUG_FLAG_BG_ALGO)
+			else if (ba_debug_flags & DEBUG_FLAG_BG_ALGO)
 				info("adding group %s %d",
 				     image_group->name,
 				     image_group->gid);
@@ -405,7 +405,7 @@ extern int parse_image(void **dest, slurm_parser_enum_t type,
 extern void destroy_image_group_list(void *ptr)
 {
 	image_group_t *image_group = (image_group_t *)ptr;
-	if(image_group) {
+	if (image_group) {
 		xfree(image_group->name);
 		xfree(image_group);
 	}
@@ -414,9 +414,9 @@ extern void destroy_image_group_list(void *ptr)
 extern void destroy_image(void *ptr)
 {
 	image_t *n = (image_t *)ptr;
-	if(n) {
+	if (n) {
 		xfree(n->name);
-		if(n->groups) {
+		if (n->groups) {
 			list_destroy(n->groups);
 			n->groups = NULL;
 		}
@@ -427,7 +427,7 @@ extern void destroy_image(void *ptr)
 extern void destroy_ba_node(void *ptr)
 {
 	ba_node_t *ba_node = (ba_node_t *)ptr;
-	if(ba_node) {
+	if (ba_node) {
 		xfree(ba_node);
 	}
 }
@@ -483,11 +483,11 @@ extern int new_ba_request(ba_request_t* ba_request)
 	ba_request->elongate_geos = list_create(_destroy_geo);
 	memcpy(geo, ba_request->geometry, sizeof(geo));
 
-	if(ba_request->deny_pass == (uint16_t)NO_VAL)
+	if (ba_request->deny_pass == (uint16_t)NO_VAL)
 		ba_request->deny_pass = ba_deny_pass;
 
-	if(!(cluster_flags & CLUSTER_FLAG_BG)) {
-		if(geo[X] != (uint16_t)NO_VAL) {
+	if (!(cluster_flags & CLUSTER_FLAG_BG)) {
+		if (geo[X] != (uint16_t)NO_VAL) {
 			for (i=0; i<cluster_dims; i++) {
 				if ((geo[i] < 1) || (geo[i] > DIM_SIZE[i])) {
 					error("new_ba_request Error, "
@@ -504,7 +504,7 @@ extern int new_ba_request(ba_request_t* ba_request)
 		return 1;
 	}
 
-	if(geo[X] != (uint16_t)NO_VAL) {
+	if (geo[X] != (uint16_t)NO_VAL) {
 		for (i=0; i<cluster_dims; i++){
 			if ((geo[i] < 1) || (geo[i] > DIM_SIZE[i])) {
 				error("new_ba_request Error, "
@@ -526,7 +526,7 @@ extern int new_ba_request(ba_request_t* ba_request)
 
 	deny_pass = &ba_request->deny_pass;
 
-	if(ba_request->elongate || sz) {
+	if (ba_request->elongate || sz) {
 		sz=1;
 		/* decompose the size into a cubic geometry */
 		ba_request->rotate= 1;
@@ -537,14 +537,14 @@ extern int new_ba_request(ba_request_t* ba_request)
 			geo[i] = 1;
 		}
 
-		if(ba_request->size==1) {
+		if (ba_request->size==1) {
 			_append_geo(geo,
 				    ba_request->elongate_geos,
 				    ba_request->rotate);
 			goto endit;
 		}
 
-		if(ba_request->size<=DIM_SIZE[Y]) {
+		if (ba_request->size<=DIM_SIZE[Y]) {
 			geo[X] = 1;
 			geo[Y] = ba_request->size;
 			geo[Z] = 1;
@@ -555,10 +555,10 @@ extern int new_ba_request(ba_request_t* ba_request)
 		}
 
 		i = ba_request->size/4;
-		if(!(ba_request->size%2)
-		   && i <= DIM_SIZE[Y]
-		   && i <= DIM_SIZE[Z]
-		   && i*i == ba_request->size) {
+		if (!(ba_request->size%2)
+		    && i <= DIM_SIZE[Y]
+		    && i <= DIM_SIZE[Z]
+		    && i*i == ba_request->size) {
 			geo[X] = 1;
 			geo[Y] = i;
 			geo[Z] = i;
@@ -568,17 +568,17 @@ extern int new_ba_request(ba_request_t* ba_request)
 				    ba_request->rotate);
 		}
 
-		if(ba_request->size > total_sz || ba_request->size < 1) {
+		if (ba_request->size > total_sz || ba_request->size < 1) {
 			return 0;
 		}
 		sz = ba_request->size % (DIM_SIZE[Y] * DIM_SIZE[Z]);
-		if(!sz) {
+		if (!sz) {
 			i = ba_request->size / (DIM_SIZE[Y] * DIM_SIZE[Z]);
 			geo[X] = i;
 			geo[Y] = DIM_SIZE[Y];
 			geo[Z] = DIM_SIZE[Z];
 			sz=ba_request->size;
-			if((geo[X]*geo[Y]*geo[Z]) == ba_request->size)
+			if ((geo[X]*geo[Y]*geo[Z]) == ba_request->size)
 				_append_geo(geo,
 					    ba_request->elongate_geos,
 					    ba_request->rotate);
@@ -606,11 +606,11 @@ extern int new_ba_request(ba_request_t* ba_request)
 		size2 = ba_request->size;
 		//messedup:
 		for (i=picked; i<cluster_dims; i++) {
-			if(size2 <= 1)
+			if (size2 <= 1)
 				break;
 
 			sz = size2 % DIM_SIZE[i];
-			if(!sz) {
+			if (!sz) {
 				geo[i] = DIM_SIZE[i];
 				size2 /= DIM_SIZE[i];
 			} else if (size2 > DIM_SIZE[i]) {
@@ -622,16 +622,16 @@ extern int new_ba_request(ba_request_t* ba_request)
 					if (!(size2%i2) && !checked[i2]) {
 						size2 /= i2;
 
-						if(i==0)
+						if (i==0)
 							checked[i2]=1;
 
-						if(i2<DIM_SIZE[i]) {
+						if (i2<DIM_SIZE[i]) {
 							geo[i] = i2;
 						} else {
 							goto tryagain;
 						}
-						if((i2-1)!=1 &&
-						   i!=(cluster_dims-1))
+						if ((i2-1)!=1 &&
+						    i!=(cluster_dims-1))
 							break;
 					}
 				}
@@ -643,9 +643,9 @@ extern int new_ba_request(ba_request_t* ba_request)
 				   node count the job will never
 				   run.
 				*/
-				if(i2==1) {
-					if(!list_count(
-						   ba_request->elongate_geos))
+				if (i2==1) {
+					if (!list_count(
+						    ba_request->elongate_geos))
 						error("Can't make a block of "
 						      "%d into a cube.",
 						      ba_request->size);
@@ -659,7 +659,7 @@ extern int new_ba_request(ba_request_t* ba_request)
 			}
 		}
 
-		if((geo[X]*geo[Y]) <= DIM_SIZE[Y]) {
+		if ((geo[X]*geo[Y]) <= DIM_SIZE[Y]) {
 			ba_request->geometry[X] = 1;
 			ba_request->geometry[Y] = geo[X] * geo[Y];
 			ba_request->geometry[Z] = geo[Z];
@@ -668,7 +668,7 @@ extern int new_ba_request(ba_request_t* ba_request)
 				    ba_request->rotate);
 
 		}
-		if((geo[X]*geo[Z]) <= DIM_SIZE[Y]) {
+		if ((geo[X]*geo[Z]) <= DIM_SIZE[Y]) {
 			ba_request->geometry[X] = 1;
 			ba_request->geometry[Y] = geo[Y];
 			ba_request->geometry[Z] = geo[X] * geo[Z];
@@ -680,18 +680,18 @@ extern int new_ba_request(ba_request_t* ba_request)
 
 		/* Make sure geo[X] is even and then see if we can get
 		   it into the Y or Z dim. */
-		if(!(geo[X]%2) && ((geo[X]/2) <= DIM_SIZE[Y])) {
-			if(geo[Y] == 1) {
+		if (!(geo[X]%2) && ((geo[X]/2) <= DIM_SIZE[Y])) {
+			if (geo[Y] == 1) {
 				ba_request->geometry[Y] = geo[X]/2;
 				messed_with = 1;
 			} else
 				ba_request->geometry[Y] = geo[Y];
-			if(!messed_with && geo[Z] == 1) {
+			if (!messed_with && geo[Z] == 1) {
 				messed_with = 1;
 				ba_request->geometry[Z] = geo[X]/2;
 			} else
 				ba_request->geometry[Z] = geo[Z];
-			if(messed_with) {
+			if (messed_with) {
 				messed_with = 0;
 				ba_request->geometry[X] = 2;
 				_append_geo(ba_request->geometry,
@@ -699,10 +699,10 @@ extern int new_ba_request(ba_request_t* ba_request)
 					    ba_request->rotate);
 			}
 		}
-		if(geo[X] == DIM_SIZE[X]
-		   && (geo[Y] < DIM_SIZE[Y]
-		       || geo[Z] < DIM_SIZE[Z])) {
-			if(DIM_SIZE[Y]<DIM_SIZE[Z]) {
+		if (geo[X] == DIM_SIZE[X]
+		    && (geo[Y] < DIM_SIZE[Y]
+			|| geo[Z] < DIM_SIZE[Z])) {
+			if (DIM_SIZE[Y]<DIM_SIZE[Z]) {
 				i = DIM_SIZE[Y];
 				DIM_SIZE[Y] = DIM_SIZE[Z];
 				DIM_SIZE[Z] = i;
@@ -710,11 +710,11 @@ extern int new_ba_request(ba_request_t* ba_request)
 			ba_request->geometry[X] = geo[X];
 			ba_request->geometry[Y] = geo[Y];
 			ba_request->geometry[Z] = geo[Z];
-			if(ba_request->geometry[Y] < DIM_SIZE[Y]) {
+			if (ba_request->geometry[Y] < DIM_SIZE[Y]) {
 				i = (DIM_SIZE[Y] - ba_request->geometry[Y]);
 				ba_request->geometry[Y] +=i;
 			}
-			if(ba_request->geometry[Z] < DIM_SIZE[Z]) {
+			if (ba_request->geometry[Z] < DIM_SIZE[Z]) {
 				i = (DIM_SIZE[Z] - ba_request->geometry[Z]);
 				ba_request->geometry[Z] +=i;
 			}
@@ -723,13 +723,13 @@ extern int new_ba_request(ba_request_t* ba_request)
 				i2 = (ba_request->geometry[X]
 				      * ba_request->geometry[Y]
 				      * ba_request->geometry[Z]);
-				if(i2 < ba_request->size) {
+				if (i2 < ba_request->size) {
 					ba_request->geometry[X]++;
 					messed_with = 1;
 					break;
 				}
 			}
-			if(messed_with) {
+			if (messed_with) {
 				messed_with = 0;
 				_append_geo(ba_request->geometry,
 					    ba_request->elongate_geos,
@@ -737,7 +737,7 @@ extern int new_ba_request(ba_request_t* ba_request)
 			}
 		}
 
-		if((geo[X]*geo[Y]*geo[Z]) == ba_request->size)
+		if ((geo[X]*geo[Y]*geo[Z]) == ba_request->size)
 			_append_geo(geo,
 				    ba_request->elongate_geos,
 				    ba_request->rotate);
@@ -757,11 +757,11 @@ extern int new_ba_request(ba_request_t* ba_request)
 		for(i=0; i<cluster_dims-1; i++) {
 			sz = powf((float)ba_request->size,
 				  (float)1/(cluster_dims-i));
-			if(pow(sz,(cluster_dims-i)) == ba_request->size)
+			if (pow(sz,(cluster_dims-i)) == ba_request->size)
 				break;
 		}
 
-		if(i < (cluster_dims-1)) {
+		if (i < (cluster_dims-1)) {
 			/* we found something that looks like a cube! */
 			int i3 = i;
 
@@ -769,12 +769,12 @@ extern int new_ba_request(ba_request_t* ba_request)
 				geo[i] = 1;
 
 			for (i=i3; i<cluster_dims; i++)
-				if(sz<=DIM_SIZE[i])
+				if (sz<=DIM_SIZE[i])
 					geo[i] = sz;
 				else
 					goto endit;
 
-			if((geo[X]*geo[Y]*geo[Z]) == ba_request->size)
+			if ((geo[X]*geo[Y]*geo[Z]) == ba_request->size)
 				_append_geo(geo,
 					    ba_request->elongate_geos,
 					    ba_request->rotate);
@@ -790,7 +790,7 @@ extern int new_ba_request(ba_request_t* ba_request)
 	}
 
 endit:
-	if(!(geo_ptr = list_peek(ba_request->elongate_geos)))
+	if (!(geo_ptr = list_peek(ba_request->elongate_geos)))
 		return 0;
 
 	ba_request->elongate_count++;
@@ -811,9 +811,9 @@ endit:
 extern void delete_ba_request(void *arg)
 {
 	ba_request_t *ba_request = (ba_request_t *)arg;
-	if(ba_request) {
+	if (ba_request) {
 		xfree(ba_request->save_name);
-		if(ba_request->elongate_geos)
+		if (ba_request->elongate_geos)
 			list_destroy(ba_request->elongate_geos);
 #ifdef HAVE_BGL
 		xfree(ba_request->blrtsimage);
@@ -899,9 +899,9 @@ extern void ba_init(node_info_msg_t *node_info_ptr, bool sanity_check)
 	for (x = 0; x < 62; x++) {
 		if (y == '[')
 			y = 'a';
-		else if(y == '{')
+		else if (y == '{')
 			y = '0';
-		else if(y == ':')
+		else if (y == ':')
 			y = 'A';
 		letters[x] = y;
 		y++;
@@ -909,7 +909,7 @@ extern void ba_init(node_info_msg_t *node_info_ptr, bool sanity_check)
 
 	z=1;
 	for (x = 0; x < 6; x++) {
-		if(z == 4)
+		if (z == 4)
 			z++;
 		colors[x] = z;
 		z++;
@@ -917,7 +917,7 @@ extern void ba_init(node_info_msg_t *node_info_ptr, bool sanity_check)
 
 	best_count=BEST_COUNT_INIT;
 
-	if(ba_system_ptr)
+	if (ba_system_ptr)
 		_delete_ba_system();
 
 	ba_system_ptr = (ba_system_t *) xmalloc(sizeof(ba_system_t));
@@ -925,8 +925,8 @@ extern void ba_init(node_info_msg_t *node_info_ptr, bool sanity_check)
 	ba_system_ptr->num_of_proc = 0;
 
 	/* cluster_dims is already set up off of working_cluster_rec */
-	if(cluster_dims == 1) {
-		if(node_info_ptr) {
+	if (cluster_dims == 1) {
+		if (node_info_ptr) {
 			REAL_DIM_SIZE[X] = DIM_SIZE[X] =
 				node_info_ptr->record_count;
 			ba_system_ptr->num_of_proc =
@@ -935,7 +935,7 @@ extern void ba_init(node_info_msg_t *node_info_ptr, bool sanity_check)
 			REAL_DIM_SIZE[Z] = DIM_SIZE[Z] = 1;
 		}
 		goto setup_done;
-	} else if(working_cluster_rec && working_cluster_rec->dim_size) {
+	} else if (working_cluster_rec && working_cluster_rec->dim_size) {
 		for(i=0; i<working_cluster_rec->dimensions; i++) {
 			DIM_SIZE[i] = working_cluster_rec->dim_size[i];
 			REAL_DIM_SIZE[i] = DIM_SIZE[i];
@@ -944,12 +944,12 @@ extern void ba_init(node_info_msg_t *node_info_ptr, bool sanity_check)
 	}
 
 
-	if(node_info_ptr) {
+	if (node_info_ptr) {
 		for (i = 0; i < node_info_ptr->record_count; i++) {
 			node_ptr = &node_info_ptr->node_array[i];
 			number = 0;
 
-			if(!node_ptr->name) {
+			if (!node_ptr->name) {
 				for (j=0; j<HIGHEST_DIMENSIONS; j++)
 					DIM_SIZE[j] = 0;
 				goto node_info_error;
@@ -971,7 +971,7 @@ extern void ba_init(node_info_msg_t *node_info_ptr, bool sanity_check)
 				number, coords, cluster_dims, cluster_base);
 
 			for(j=0; j<cluster_dims; j++) {
-				if(DIM_SIZE[j] < coords[j])
+				if (DIM_SIZE[j] < coords[j])
 					DIM_SIZE[j] = coords[j];
 			}
 		}
@@ -1001,10 +1001,10 @@ node_info_error:
 				    && (node->nodenames[j+4] == 'x'
 					|| node->nodenames[j+4] == '-')) {
 					j+=5;
-				} else if((node->nodenames[j] >= '0'
-					   && node->nodenames[j] <= '9')
-					  || (node->nodenames[j] >= 'A'
-					      && node->nodenames[j] <= 'Z')) {
+				} else if ((node->nodenames[j] >= '0'
+					    && node->nodenames[j] <= '9')
+					   || (node->nodenames[j] >= 'A'
+					       && node->nodenames[j] <= 'Z')) {
 					/* suppose to be blank, just
 					   making sure this is the
 					   correct alpha num
@@ -1025,7 +1025,7 @@ node_info_error:
 					DIM_SIZE[k] = MAX(DIM_SIZE[k],
 							  coords[k]);
 
-				if(node->nodenames[j] != ',')
+				if (node->nodenames[j] != ',')
 					break;
 			}
 		}
@@ -1061,9 +1061,9 @@ node_info_error:
 			REAL_DIM_SIZE[X] = bp_size.X;
 			REAL_DIM_SIZE[Y] = bp_size.Y;
 			REAL_DIM_SIZE[Z] = bp_size.Z;
-			if((DIM_SIZE[X] > bp_size.X)
-			   || (DIM_SIZE[Y] > bp_size.Y)
-			   || (DIM_SIZE[Z] > bp_size.Z)) {
+			if ((DIM_SIZE[X] > bp_size.X)
+			    || (DIM_SIZE[Y] > bp_size.Y)
+			    || (DIM_SIZE[Z] > bp_size.Z)) {
 				fatal("You requested a %c%c%c system, "
 				      "but we only have a system of %c%c%c.  "
 				      "Change your slurm.conf.",
@@ -1081,7 +1081,7 @@ node_info_error:
 #endif
 
 setup_done:
-	if(cluster_dims == 1) {
+	if (cluster_dims == 1) {
 		if (DIM_SIZE[X]==0) {
 			debug("Setting default system dimensions");
 			REAL_DIM_SIZE[X] = DIM_SIZE[X]=100;
@@ -1095,7 +1095,7 @@ setup_done:
 		      alpha_num[DIM_SIZE[Z]]);
 	}
 
-	if(!ba_system_ptr->num_of_proc) {
+	if (!ba_system_ptr->num_of_proc) {
 		ba_system_ptr->num_of_proc = 1;
 		for(i=0; i<cluster_dims; i++)
 			ba_system_ptr->num_of_proc *= DIM_SIZE[i];
@@ -1126,7 +1126,7 @@ extern void init_wires()
 {
 	int x, y, z, i;
 	ba_node_t *source = NULL;
-	if(_wires_initialized)
+	if (_wires_initialized)
 		return;
 
 	for(x=0;x<DIM_SIZE[X];x++) {
@@ -1146,8 +1146,8 @@ extern void init_wires()
 	}
 #ifdef HAVE_BG_FILES
 	_set_external_wires(0,0,NULL,NULL);
-	if(!bp_map_list) {
-		if(set_bp_map() == -1) {
+	if (!bp_map_list) {
+		if (set_bp_map() == -1) {
 			return;
 		}
 	}
@@ -1178,7 +1178,7 @@ extern void ba_fini()
 		best_path = NULL;
 	}
 #ifdef HAVE_BG_FILES
-	if(bg)
+	if (bg)
 		bridge_free_bg(bg);
 
 	if (bp_map_list) {
@@ -1232,8 +1232,8 @@ extern void ba_update_node_state(ba_node_t *ba_node, uint16_t state)
 #endif
 
 	/* basically set the node as used */
-	if((node_base_state == NODE_STATE_DOWN)
-	   || (node_flags & (NODE_STATE_DRAIN | NODE_STATE_FAIL)))
+	if ((node_base_state == NODE_STATE_DOWN)
+	    || (node_flags & (NODE_STATE_DRAIN | NODE_STATE_FAIL)))
 		ba_node->used = true;
 	else
 		ba_node->used = false;
@@ -1274,15 +1274,15 @@ extern int copy_node_path(List nodes, List *dest_nodes)
 	int dim;
 	ba_switch_t *curr_switch = NULL, *new_switch = NULL;
 
-	if(!nodes)
+	if (!nodes)
 		return SLURM_ERROR;
-	if(!*dest_nodes)
+	if (!*dest_nodes)
 		*dest_nodes = list_create(destroy_ba_node);
 
 	itr = list_iterator_create(nodes);
-	while((ba_node = list_next(itr))) {
+	while ((ba_node = list_next(itr))) {
 		itr2 = list_iterator_create(*dest_nodes);
-		while((new_ba_node = list_next(itr2))) {
+		while ((new_ba_node = list_next(itr2))) {
 			if (ba_node->coord[X] == new_ba_node->coord[X] &&
 			    ba_node->coord[Y] == new_ba_node->coord[Y] &&
 			    ba_node->coord[Z] == new_ba_node->coord[Z])
@@ -1290,8 +1290,8 @@ extern int copy_node_path(List nodes, List *dest_nodes)
 		}
 		list_iterator_destroy(itr2);
 
-		if(!new_ba_node) {
-			if(ba_debug_flags & DEBUG_FLAG_BG_ALGO)
+		if (!new_ba_node) {
+			if (ba_debug_flags & DEBUG_FLAG_BG_ALGO)
 				info("adding %c%c%c as a new node",
 				     alpha_num[ba_node->coord[X]],
 				     alpha_num[ba_node->coord[Y]],
@@ -1305,10 +1305,10 @@ extern int copy_node_path(List nodes, List *dest_nodes)
 		for(dim=0;dim<cluster_dims;dim++) {
 			curr_switch = &ba_node->axis_switch[dim];
 			new_switch = &new_ba_node->axis_switch[dim];
-			if(curr_switch->int_wire[0].used) {
-				if(!_copy_the_path(*dest_nodes,
-						   curr_switch, new_switch,
-						   0, dim)) {
+			if (curr_switch->int_wire[0].used) {
+				if (!_copy_the_path(*dest_nodes,
+						    curr_switch, new_switch,
+						    0, dim)) {
 					rc = SLURM_ERROR;
 					break;
 				}
@@ -1367,7 +1367,7 @@ extern int remove_block(List nodes, int new_count, int conn_type)
 	ListIterator itr;
 
 	itr = list_iterator_create(nodes);
-	while((curr_ba_node = (ba_node_t*) list_next(itr))) {
+	while ((curr_ba_node = (ba_node_t*) list_next(itr))) {
 		/* since the list that comes in might not be pointers
 		   to the main list we need to point to that main list */
 		ba_node = &ba_system_ptr->
@@ -1380,22 +1380,22 @@ extern int remove_block(List nodes, int new_count, int conn_type)
 		ba_node->letter = '.';
 		/* Small blocks don't use wires, and only have 1 node,
 		   so just break. */
-		if(conn_type == SELECT_SMALL)
+		if (conn_type == SELECT_SMALL)
 			break;
 		for(dim=0;dim<cluster_dims;dim++) {
 			curr_switch = &ba_node->axis_switch[dim];
-			if(curr_switch->int_wire[0].used) {
+			if (curr_switch->int_wire[0].used) {
 				_reset_the_path(curr_switch, 0, 1, dim);
 			}
 		}
 	}
 	list_iterator_destroy(itr);
-	if(new_count == NO_VAL) {
-	} else if(new_count == -1)
+	if (new_count == NO_VAL) {
+	} else if (new_count == -1)
 		color_count--;
 	else
 		color_count=new_count;
-	if(color_count < 0)
+	if (color_count < 0)
 		color_count = 0;
 	return 1;
 }
@@ -1422,14 +1422,14 @@ extern int alter_block(List nodes, int conn_type)
 
 /* 		for(dim=0;dim<cluster_dims;dim++) { */
 /* 			curr_switch = &ba_node->axis_switch[dim]; */
-/* 			if(curr_switch->int_wire[0].used) { */
+/* 			if (curr_switch->int_wire[0].used) { */
 /* 				_reset_the_path(curr_switch, 0, 1, dim); */
 /* 			} */
 /* 		} */
 /* 		size++; */
 /* 	} */
 /* 	list_iterator_destroy(results_i); */
-/* 	if((name = _set_internal_wires(nodes, size, conn_type)) == NULL) */
+/* 	if ((name = _set_internal_wires(nodes, size, conn_type)) == NULL) */
 /* 		return SLURM_ERROR; */
 /* 	else { */
 /* 		xfree(name); */
@@ -1448,14 +1448,14 @@ extern int redo_block(List nodes, uint16_t *geo, int conn_type, int new_count)
 	char *name = NULL;
 
 	ba_node = list_peek(nodes);
-	if(!ba_node)
+	if (!ba_node)
 		return SLURM_ERROR;
 
 	remove_block(nodes, new_count, conn_type);
 	list_delete_all(nodes, &empty_null_destroy_list, "");
 
 	name = set_bg_block(nodes, ba_node->coord, geo, conn_type);
-	if(!name)
+	if (!name)
 		return SLURM_ERROR;
 	else {
 		xfree(name);
@@ -1486,11 +1486,11 @@ extern int check_and_set_node_list(List nodes)
 	ba_node_t *ba_node = NULL, *curr_ba_node = NULL;
 	ListIterator itr = NULL;
 
-	if(!nodes)
+	if (!nodes)
 		return rc;
 
 	itr = list_iterator_create(nodes);
-	while((ba_node = list_next(itr))) {
+	while ((ba_node = list_next(itr))) {
 		/* info("checking %c%c%c", */
 /* 		     ba_node->coord[X],  */
 /* 		     ba_node->coord[Y], */
@@ -1501,7 +1501,7 @@ extern int check_and_set_node_list(List nodes)
 			[ba_node->coord[Y]]
 			[ba_node->coord[Z]];
 
-		if(ba_node->used && curr_ba_node->used) {
+		if (ba_node->used && curr_ba_node->used) {
 			/* Only error if the midplane isn't already
 			 * marked down or in a error state outside of
 			 * the bluegene block.
@@ -1511,7 +1511,7 @@ extern int check_and_set_node_list(List nodes)
 			node_flags = curr_ba_node->state & NODE_STATE_FLAGS;
 			if (!(node_flags & (NODE_STATE_DRAIN | NODE_STATE_FAIL))
 			    && (base_state != NODE_STATE_DOWN)) {
-				if(ba_debug_flags & DEBUG_FLAG_BG_ALGO_DEEP)
+				if (ba_debug_flags & DEBUG_FLAG_BG_ALGO_DEEP)
 					info("I have already been to "
 					     "this node %c%c%c %s",
 					     alpha_num[ba_node->coord[X]],
@@ -1524,7 +1524,7 @@ extern int check_and_set_node_list(List nodes)
 			}
 		}
 
-		if(ba_node->used)
+		if (ba_node->used)
 			curr_ba_node->used = true;
 		for(i=0; i<cluster_dims; i++) {
 			ba_switch = &ba_node->axis_switch[i];
@@ -1534,12 +1534,12 @@ extern int check_and_set_node_list(List nodes)
 			for(j=0; j<NUM_PORTS_PER_NODE; j++) {
 				//info("checking port %d", j);
 
-				if(ba_switch->int_wire[j].used
-				   && curr_ba_switch->int_wire[j].used
-				   && j != curr_ba_switch->
-				   int_wire[j].port_tar) {
-					if(ba_debug_flags
-					   & DEBUG_FLAG_BG_ALGO_DEEP)
+				if (ba_switch->int_wire[j].used
+				    && curr_ba_switch->int_wire[j].used
+				    && j != curr_ba_switch->
+				    int_wire[j].port_tar) {
+					if (ba_debug_flags
+					    & DEBUG_FLAG_BG_ALGO_DEEP)
 						info("%c%c%c dim %d port %d "
 						     "is already in use to %d",
 						     alpha_num[ba_node->
@@ -1555,10 +1555,10 @@ extern int check_and_set_node_list(List nodes)
 					rc = SLURM_ERROR;
 					goto end_it;
 				}
-				if(!ba_switch->int_wire[j].used)
+				if (!ba_switch->int_wire[j].used)
 					continue;
 
-				/* info("setting %c%c%c dim %d port %d -> %d", */
+				/* info("setting %c%c%c dim %d port %d -> %d",*/
 /* 				     alpha_num[ba_node->coord[X]],  */
 /* 				     alpha_num[ba_node->coord[Y]], */
 /* 				     alpha_num[ba_node->coord[Z]],  */
@@ -1602,18 +1602,18 @@ extern char *set_bg_block(List results, uint16_t *start,
 	int found = 0;
 
 
-	if(cluster_dims == 1) {
-		if(start[X]>=DIM_SIZE[X])
+	if (cluster_dims == 1) {
+		if (start[X]>=DIM_SIZE[X])
 			return NULL;
 		size = geometry[X];
 		ba_node = &ba_system_ptr->grid[start[X]][0][0];
 	} else {
-		if(start[X]>=DIM_SIZE[X]
-		   || start[Y]>=DIM_SIZE[Y]
-		   || start[Z]>=DIM_SIZE[Z])
+		if (start[X]>=DIM_SIZE[X]
+		    || start[Y]>=DIM_SIZE[Y]
+		    || start[Z]>=DIM_SIZE[Z])
 			return NULL;
 
-		if(geometry[X] <= 0 || geometry[Y] <= 0 || geometry[Z] <= 0) {
+		if (geometry[X] <= 0 || geometry[Y] <= 0 || geometry[Z] <= 0) {
 			error("problem with geometry %c%c%c, needs to be "
 			      "at least 111",
 			      alpha_num[geometry[X]],
@@ -1621,32 +1621,33 @@ extern char *set_bg_block(List results, uint16_t *start,
 			      alpha_num[geometry[Z]]);
 			return NULL;
 		}
-		//info("looking at %d%d%d", geometry[X], geometry[Y], geometry[Z]);
+		/* info("looking at %d%d%d", geometry[X], */
+		/*      geometry[Y], geometry[Z]); */
 		size = geometry[X] * geometry[Y] * geometry[Z];
 		ba_node = &ba_system_ptr->grid[start[X]][start[Y]][start[Z]];
 	}
 
-	if(!ba_node)
+	if (!ba_node)
 		return NULL;
 
-	if(!results)
+	if (!results)
 		results = list_create(NULL);
 	else
 		send_results = 1;
 	/* This midplane should have already been checked if it was in
 	   use or not */
 	list_append(results, ba_node);
-	if(conn_type >= SELECT_SMALL) {
+	if (conn_type >= SELECT_SMALL) {
 		/* adding the ba_node and ending */
 		ba_node->used = true;
 		name = xstrdup_printf("%c%c%c",
 				      alpha_num[ba_node->coord[X]],
 				      alpha_num[ba_node->coord[Y]],
 				      alpha_num[ba_node->coord[Z]]);
-		if(ba_node->letter == '.') {
+		if (ba_node->letter == '.') {
 			ba_node->letter = letters[color_count%62];
 			ba_node->color = colors[color_count%6];
-			if(ba_debug_flags & DEBUG_FLAG_BG_ALGO_DEEP)
+			if (ba_debug_flags & DEBUG_FLAG_BG_ALGO_DEEP)
 				info("count %d setting letter = %c "
 				     "color = %d",
 				     color_count,
@@ -1662,7 +1663,7 @@ extern char *set_bg_block(List results, uint16_t *start,
 			     1,
 			     conn_type, BLOCK_ALGO_FIRST);
 
-	if(!found) {
+	if (!found) {
 		debug2("trying less efficient code");
 		remove_block(results, color_count, conn_type);
 		list_delete_all(results, &empty_null_destroy_list, "");
@@ -1673,22 +1674,22 @@ extern char *set_bg_block(List results, uint16_t *start,
 				     1,
 				     conn_type, BLOCK_ALGO_SECOND);
 	}
-	if(found) {
-		if(cluster_flags & CLUSTER_FLAG_BG) {
+	if (found) {
+		if (cluster_flags & CLUSTER_FLAG_BG) {
 			List start_list = NULL;
 			ListIterator itr;
 
 			start_list = list_create(NULL);
 			itr = list_iterator_create(results);
-			while((ba_node = (ba_node_t*) list_next(itr))) {
+			while ((ba_node = (ba_node_t*) list_next(itr))) {
 				list_append(start_list, ba_node);
 			}
 			list_iterator_destroy(itr);
 
-			if(!_fill_in_coords(results,
-					    start_list,
-					    geometry,
-					    conn_type)) {
+			if (!_fill_in_coords(results,
+					     start_list,
+					     geometry,
+					     conn_type)) {
 				list_destroy(start_list);
 				goto end_it;
 			}
@@ -1702,11 +1703,11 @@ extern char *set_bg_block(List results, uint16_t *start,
 				   size,
 				   conn_type);
 end_it:
-	if(!send_results && results) {
+	if (!send_results && results) {
 		list_destroy(results);
 		results = NULL;
 	}
-	if(name!=NULL) {
+	if (name!=NULL) {
 		debug2("name = %s", name);
 	} else {
 		debug2("can't allocate");
@@ -1758,10 +1759,10 @@ extern int removable_set_bps(char *bps)
 	int start[cluster_dims];
         int end[cluster_dims];
 
-	if(!bps)
+	if (!bps)
 		return SLURM_ERROR;
 
-	while(bps[j] != '\0') {
+	while (bps[j] != '\0') {
 		if ((bps[j] == '[' || bps[j] == ',')
 		    && (bps[j+8] == ']' || bps[j+8] == ',')
 		    && (bps[j+4] == 'x' || bps[j+4] == '-')) {
@@ -1780,8 +1781,8 @@ extern int removable_set_bps(char *bps)
 			for (x = start[X]; x <= end[X]; x++) {
 				for (y = start[Y]; y <= end[Y]; y++) {
 					for (z = start[Z]; z <= end[Z]; z++) {
-						if(!ba_system_ptr->grid[x][y][z]
-						   .used)
+						if (!ba_system_ptr->
+						    grid[x][y][z].used)
 							ba_system_ptr->
 								grid[x][y][z]
 								.used = 2;
@@ -1789,11 +1790,11 @@ extern int removable_set_bps(char *bps)
 				}
 			}
 
-			if(bps[j] != ',')
+			if (bps[j] != ',')
 				break;
 			j--;
-		} else if((bps[j] >= '0' && bps[j] <= '9')
-			  || (bps[j] >= 'A' && bps[j] <= 'Z')) {
+		} else if ((bps[j] >= '0' && bps[j] <= '9')
+			   || (bps[j] >= 'A' && bps[j] <= 'Z')) {
 			number = xstrntol(bps + j, &p, cluster_dims,
 					  cluster_base);
 			hostlist_parse_int_to_array(
@@ -1802,10 +1803,10 @@ extern int removable_set_bps(char *bps)
 			y = start[Y];
 			z = start[Z];
 			j+=3;
-			if(!ba_system_ptr->grid[x][y][z].used)
+			if (!ba_system_ptr->grid[x][y][z].used)
 				ba_system_ptr->grid[x][y][z].used = 2;
 
-			if(bps[j] != ',')
+			if (bps[j] != ',')
 				break;
 			j--;
 		}
@@ -1826,7 +1827,7 @@ extern int reset_all_removed_bps()
 	for (x = 0; x < DIM_SIZE[X]; x++) {
 		for (y = 0; y < DIM_SIZE[Y]; y++)
 			for (z = 0; z < DIM_SIZE[Z]; z++)
-				if(ba_system_ptr->grid[x][y][z].used == 2)
+				if (ba_system_ptr->grid[x][y][z].used == 2)
 					ba_system_ptr->grid[x][y][z].used = 0;
 	}
 	return SLURM_SUCCESS;
@@ -1852,7 +1853,7 @@ extern int set_all_bps_except(char *bps)
 
 	memset(coords, 0, sizeof(coords));
 
-	while((host = hostlist_shift(hl))){
+	while ((host = hostlist_shift(hl))){
 		numeric = host;
 		number = 0;
 		while (numeric) {
@@ -1877,12 +1878,12 @@ extern int set_all_bps_except(char *bps)
 	for (x = 0; x < DIM_SIZE[X]; x++) {
 		for (y = 0; y < DIM_SIZE[Y]; y++)
 			for (z = 0; z < DIM_SIZE[Z]; z++) {
-				if(ba_system_ptr->grid[x][y][z].state
-				   & NODE_RESUME) {
+				if (ba_system_ptr->grid[x][y][z].state
+				    & NODE_RESUME) {
 					/* clear the bit and mark as unused */
 					ba_system_ptr->grid[x][y][z].state &=
 						~NODE_RESUME;
-				} else if(!ba_system_ptr->grid[x][y][z].used) {
+				} else if (!ba_system_ptr->grid[x][y][z].used) {
 					ba_system_ptr->grid[x][y][z].used = 2;
 				}
 			}
@@ -2005,7 +2006,7 @@ extern int set_bp_map(void)
 	char *bp_id = NULL;
 	rm_location_t bp_loc;
 
-	if(_bp_map_initialized)
+	if (_bp_map_initialized)
 		return 1;
 
 	bp_map_list = list_create(_bp_map_list_del);
@@ -2024,7 +2025,7 @@ extern int set_bp_map(void)
 #endif
 
 	if (!bg) {
-		if((rc = bridge_get_bg(&bg)) != STATUS_OK) {
+		if ((rc = bridge_get_bg(&bg)) != STATUS_OK) {
 			error("bridge_get_BG(): %d", rc);
 			return -1;
 		}
@@ -2060,7 +2061,7 @@ extern int set_bp_map(void)
 			continue;
 		}
 
-		if(!bp_id) {
+		if (!bp_id) {
 			error("No BP ID was returned from database");
 			continue;
 		}
@@ -2097,8 +2098,8 @@ extern uint16_t *find_bp_loc(char* bp_id)
 	ListIterator itr;
 	char *check = NULL;
 
-	if(!bp_map_list) {
-		if(set_bp_map() == -1)
+	if (!bp_map_list) {
+		if (set_bp_map() == -1)
 			return NULL;
 	}
 
@@ -2107,30 +2108,30 @@ extern uint16_t *find_bp_loc(char* bp_id)
 	 * R000 to R00-M0 so we now support both formats for each of the
 	 * systems */
 #ifdef HAVE_BGL
-	if(check[3] == '-') {
-		if(check[5]) {
+	if (check[3] == '-') {
+		if (check[5]) {
 			check[3] = check[5];
 			check[4] = '\0';
 		}
 	}
 
-	if((check[1] < '0' || check[1] > '9')
-	   || (check[2] < '0' || check[2] > '9')
-	   || (check[3] < '0' || check[3] > '9')) {
+	if ((check[1] < '0' || check[1] > '9')
+	    || (check[2] < '0' || check[2] > '9')
+	    || (check[3] < '0' || check[3] > '9')) {
 		error("%s is not a valid Rack-Midplane (i.e. R000)", bp_id);
 		goto cleanup;
 	}
 
 #else
-	if(check[3] != '-') {
+	if (check[3] != '-') {
 		xfree(check);
 		check = xstrdup_printf("R%c%c-M%c",
 				       bp_id[1], bp_id[2], bp_id[3]);
 	}
 
-	if((check[1] < '0' || check[1] > '9')
-	   || (check[2] < '0' || check[2] > '9')
-	   || (check[5] < '0' || check[5] > '9')) {
+	if ((check[1] < '0' || check[1] > '9')
+	    || (check[2] < '0' || check[2] > '9')
+	    || (check[5] < '0' || check[5] > '9')) {
 		error("%s is not a valid Rack-Midplane (i.e. R00-M0)", bp_id);
 		goto cleanup;
 	}
@@ -2145,7 +2146,7 @@ extern uint16_t *find_bp_loc(char* bp_id)
 cleanup:
 	xfree(check);
 
-	if(bp_map != NULL)
+	if (bp_map != NULL)
 		return bp_map->coord;
 	else
 		return NULL;
@@ -2168,12 +2169,12 @@ extern char *find_bp_rack_mid(char* xyz)
 	int len = strlen(xyz);
 
 	len -= 3;
-	if(len<0)
+	if (len<0)
 		return NULL;
 
-	if((xyz[len] < '0' || xyz[len] > '9')
-	   || (xyz[len+1] < '0' || xyz[len+1] > '9')
-	   || (xyz[len+2] < '0' || xyz[len+2] > '9')) {
+	if ((xyz[len] < '0' || xyz[len] > '9')
+	    || (xyz[len+1] < '0' || xyz[len+1] > '9')
+	    || (xyz[len+2] < '0' || xyz[len+2] > '9')) {
 		error("%s is not a valid Location (i.e. 000)", xyz);
 		return NULL;
 	}
@@ -2181,8 +2182,8 @@ extern char *find_bp_rack_mid(char* xyz)
 	number = xstrntol(xyz + len, &p, cluster_dims, cluster_base);
 	hostlist_parse_int_to_array(number, coord, cluster_dims, cluster_base);
 
-	if(!bp_map_list) {
-		if(set_bp_map() == -1)
+	if (!bp_map_list) {
+		if (set_bp_map() == -1)
 			return NULL;
 	}
 
@@ -2194,7 +2195,7 @@ extern char *find_bp_rack_mid(char* xyz)
 			break;	/* we found it */
 
 	list_iterator_destroy(itr);
-	if(bp_map != NULL)
+	if (bp_map != NULL)
 		return bp_map->bp_id;
 	else
 		return NULL;
@@ -2222,7 +2223,7 @@ extern int load_block_wiring(char *bg_block_id)
 	ba_switch_t *ba_switch = NULL;
 	uint16_t *geo = NULL;
 
-	if(ba_debug_flags & DEBUG_FLAG_BG_ALGO)
+	if (ba_debug_flags & DEBUG_FLAG_BG_ALGO)
 		info("getting info for block %s", bg_block_id);
 
 	if ((rc = bridge_get_block(bg_block_id,  &block_ptr)) != STATUS_OK) {
@@ -2238,8 +2239,8 @@ extern int load_block_wiring(char *bg_block_id)
 		      bg_err_str(rc));
 		return SLURM_ERROR;
 	}
-	if(!switch_cnt) {
-		if(ba_debug_flags & DEBUG_FLAG_BG_ALGO_DEEP)
+	if (!switch_cnt) {
+		if (ba_debug_flags & DEBUG_FLAG_BG_ALGO_DEEP)
 			info("no switch_cnt");
 		if ((rc = bridge_get_data(block_ptr,
 					  RM_PartitionFirstBP,
@@ -2258,7 +2259,7 @@ extern int load_block_wiring(char *bg_block_id)
 		}
 
 		geo = find_bp_loc(switchid);
-		if(!geo) {
+		if (!geo) {
 			error("find_bp_loc: bpid %s not known", switchid);
 			return SLURM_ERROR;
 		}
@@ -2266,7 +2267,7 @@ extern int load_block_wiring(char *bg_block_id)
 		return SLURM_SUCCESS;
 	}
 	for (i=0; i<switch_cnt; i++) {
-		if(i) {
+		if (i) {
 			if ((rc = bridge_get_data(block_ptr,
 						  RM_PartitionNextSwitch,
 						  &curr_switch))
@@ -2302,7 +2303,7 @@ extern int load_block_wiring(char *bg_block_id)
 		}
 
 		geo = find_bp_loc(switchid);
-		if(!geo) {
+		if (!geo) {
 			error("find_bp_loc: bpid %s not known", switchid);
 			return SLURM_ERROR;
 		}
@@ -2313,13 +2314,13 @@ extern int load_block_wiring(char *bg_block_id)
 			      bg_err_str(rc));
 			return SLURM_ERROR;
 		}
-		if(ba_debug_flags & DEBUG_FLAG_BG_ALGO)
+		if (ba_debug_flags & DEBUG_FLAG_BG_ALGO)
 			info("switch id = %s dim %d conns = %d",
 			     switchid, dim, cnt);
 		ba_switch = &ba_system_ptr->
 			grid[geo[X]][geo[Y]][geo[Z]].axis_switch[dim];
 		for (j=0; j<cnt; j++) {
-			if(j) {
+			if (j) {
 				if ((rc = bridge_get_data(
 					     curr_switch,
 					     RM_SwitchNextConnection,
@@ -2374,9 +2375,9 @@ extern int load_block_wiring(char *bg_block_id)
 				return SLURM_ERROR;
 			}
 
-			if(curr_conn.p1 == 1 && dim == X) {
-				if(ba_system_ptr->
-				   grid[geo[X]][geo[Y]][geo[Z]].used) {
+			if (curr_conn.p1 == 1 && dim == X) {
+				if (ba_system_ptr->
+				    grid[geo[X]][geo[Y]][geo[Z]].used) {
 					debug("I have already been to "
 					      "this node %c%c%c",
 					      alpha_num[geo[X]],
@@ -2387,11 +2388,11 @@ extern int load_block_wiring(char *bg_block_id)
 				ba_system_ptr->grid[geo[X]][geo[Y]][geo[Z]].
 					used = true;
 			}
-			if(ba_debug_flags & DEBUG_FLAG_BG_ALGO_DEEP)
+			if (ba_debug_flags & DEBUG_FLAG_BG_ALGO_DEEP)
 				info("connection going from %d -> %d",
 				     curr_conn.p1, curr_conn.p2);
 
-			if(ba_switch->int_wire[curr_conn.p1].used) {
+			if (ba_switch->int_wire[curr_conn.p1].used) {
 				debug("%c%c%c dim %d port %d "
 				      "is already in use",
 				      alpha_num[geo[X]],
@@ -2405,7 +2406,7 @@ extern int load_block_wiring(char *bg_block_id)
 			ba_switch->int_wire[curr_conn.p1].port_tar
 				= curr_conn.p2;
 
-			if(ba_switch->int_wire[curr_conn.p2].used) {
+			if (ba_switch->int_wire[curr_conn.p2].used) {
 				debug("%c%c%c dim %d port %d "
 				      "is already in use",
 				      alpha_num[geo[X]],
@@ -2452,7 +2453,7 @@ extern List get_and_set_block_wiring(char *bg_block_id,
 	List results = list_create(destroy_ba_node);
 	ListIterator itr = NULL;
 
-	if(ba_debug_flags & DEBUG_FLAG_BG_ALGO)
+	if (ba_debug_flags & DEBUG_FLAG_BG_ALGO)
 		info("getting info for block %s", bg_block_id);
 
 	if ((rc = bridge_get_data(block_ptr, RM_PartitionSwitchNum,
@@ -2461,8 +2462,8 @@ extern List get_and_set_block_wiring(char *bg_block_id,
 		      bg_err_str(rc));
 		goto end_it;
 	}
-	if(!switch_cnt) {
-		if(ba_debug_flags & DEBUG_FLAG_BG_ALGO_DEEP)
+	if (!switch_cnt) {
+		if (ba_debug_flags & DEBUG_FLAG_BG_ALGO_DEEP)
 			info("no switch_cnt");
 		if ((rc = bridge_get_data(block_ptr,
 					  RM_PartitionFirstBP,
@@ -2481,7 +2482,7 @@ extern List get_and_set_block_wiring(char *bg_block_id,
 		}
 
 		geo = find_bp_loc(switchid);
-		if(!geo) {
+		if (!geo) {
 			error("find_bp_loc: bpid %s not known", switchid);
 			goto end_it;
 		}
@@ -2495,7 +2496,7 @@ extern List get_and_set_block_wiring(char *bg_block_id,
 		return results;
 	}
 	for (i=0; i<switch_cnt; i++) {
-		if(i) {
+		if (i) {
 			if ((rc = bridge_get_data(block_ptr,
 						  RM_PartitionNextSwitch,
 						  &curr_switch))
@@ -2531,7 +2532,7 @@ extern List get_and_set_block_wiring(char *bg_block_id,
 		}
 
 		geo = find_bp_loc(switchid);
-		if(!geo) {
+		if (!geo) {
 			error("find_bp_loc: bpid %s not known", switchid);
 			goto end_it;
 		}
@@ -2542,19 +2543,19 @@ extern List get_and_set_block_wiring(char *bg_block_id,
 			      bg_err_str(rc));
 			goto end_it;
 		}
-		if(ba_debug_flags & DEBUG_FLAG_BG_ALGO)
+		if (ba_debug_flags & DEBUG_FLAG_BG_ALGO)
 			info("switch id = %s dim %d conns = %d",
 			     switchid, dim, cnt);
 
 		itr = list_iterator_create(results);
-		while((ba_node = list_next(itr))) {
+		while ((ba_node = list_next(itr))) {
 			if (ba_node->coord[X] == geo[X] &&
 			    ba_node->coord[Y] == geo[Y] &&
 			    ba_node->coord[Z] == geo[Z])
 				break;	/* we found it */
 		}
 		list_iterator_destroy(itr);
-		if(!ba_node) {
+		if (!ba_node) {
 			ba_node = xmalloc(sizeof(ba_node_t));
 
 			list_push(results, ba_node);
@@ -2564,7 +2565,7 @@ extern List get_and_set_block_wiring(char *bg_block_id,
 		}
 		ba_switch = &ba_node->axis_switch[dim];
 		for (j=0; j<cnt; j++) {
-			if(j) {
+			if (j) {
 				if ((rc = bridge_get_data(
 					     curr_switch,
 					     RM_SwitchNextConnection,
@@ -2619,8 +2620,8 @@ extern List get_and_set_block_wiring(char *bg_block_id,
 				goto end_it;
 			}
 
-			if(curr_conn.p1 == 1 && dim == X) {
-				if(ba_node->used) {
+			if (curr_conn.p1 == 1 && dim == X) {
+				if (ba_node->used) {
 					debug("I have already been to "
 					      "this node %c%c%c",
 					      alpha_num[geo[X]],
@@ -2630,11 +2631,11 @@ extern List get_and_set_block_wiring(char *bg_block_id,
 				}
 				ba_node->used = true;
 			}
-			if(ba_debug_flags & DEBUG_FLAG_BG_ALGO_DEEP)
+			if (ba_debug_flags & DEBUG_FLAG_BG_ALGO_DEEP)
 				info("connection going from %d -> %d",
 				     curr_conn.p1, curr_conn.p2);
 
-			if(ba_switch->int_wire[curr_conn.p1].used) {
+			if (ba_switch->int_wire[curr_conn.p1].used) {
 				debug("%c%c%c dim %d port %d "
 				      "is already in use",
 				      alpha_num[geo[X]],
@@ -2648,7 +2649,7 @@ extern List get_and_set_block_wiring(char *bg_block_id,
 			ba_switch->int_wire[curr_conn.p1].port_tar
 				= curr_conn.p2;
 
-			if(ba_switch->int_wire[curr_conn.p2].used) {
+			if (ba_switch->int_wire[curr_conn.p2].used) {
 				debug("%c%c%c dim %d port %d "
 				      "is already in use",
 				      alpha_num[geo[X]],
@@ -2677,9 +2678,9 @@ end_it:
 extern int validate_coord(uint16_t *coord)
 {
 #ifdef HAVE_BG_FILES
-	if(coord[X]>=REAL_DIM_SIZE[X]
-	   || coord[Y]>=REAL_DIM_SIZE[Y]
-	   || coord[Z]>=REAL_DIM_SIZE[Z]) {
+	if (coord[X]>=REAL_DIM_SIZE[X]
+	    || coord[Y]>=REAL_DIM_SIZE[Y]
+	    || coord[Z]>=REAL_DIM_SIZE[Z]) {
 		error("got coord %c%c%c greater than system dims "
 		      "%c%c%c",
 		      alpha_num[coord[X]],
@@ -2691,10 +2692,10 @@ extern int validate_coord(uint16_t *coord)
 		return 0;
 	}
 
-	if(coord[X]>=DIM_SIZE[X]
-	   || coord[Y]>=DIM_SIZE[Y]
-	   || coord[Z]>=DIM_SIZE[Z]) {
-		if(ba_debug_flags & DEBUG_FLAG_BG_ALGO_DEEP)
+	if (coord[X]>=DIM_SIZE[X]
+	    || coord[Y]>=DIM_SIZE[Y]
+	    || coord[Z]>=DIM_SIZE[Z]) {
+		if (ba_debug_flags & DEBUG_FLAG_BG_ALGO_DEEP)
 			info("got coord %c%c%c greater than what we are using "
 			     "%c%c%c",
 			     alpha_num[coord[X]],
@@ -2763,7 +2764,7 @@ static int _check_for_options(ba_request_t* ba_request)
 	uint16_t *geo = NULL;
 	ListIterator itr;
 
-	if(ba_request->rotate) {
+	if (ba_request->rotate) {
 	rotate_again:
 		debug2("Rotating! %d",ba_request->rotate_count);
 
@@ -2774,7 +2775,7 @@ static int _check_for_options(ba_request_t* ba_request)
 			ba_request->rotate_count++;
 			set=1;
 
-		} else if(ba_request->rotate_count<(cluster_dims*2)) {
+		} else if (ba_request->rotate_count<(cluster_dims*2)) {
 			temp=ba_request->geometry[X];
 			ba_request->geometry[X]=ba_request->geometry[Y];
 			ba_request->geometry[Y]=ba_request->geometry[Z];
@@ -2783,10 +2784,10 @@ static int _check_for_options(ba_request_t* ba_request)
 			set=1;
 		} else
 			ba_request->rotate = false;
-		if(set) {
-			if(ba_request->geometry[X]<=DIM_SIZE[X]
-			   && ba_request->geometry[Y]<=DIM_SIZE[Y]
-			   && ba_request->geometry[Z]<=DIM_SIZE[Z])
+		if (set) {
+			if (ba_request->geometry[X]<=DIM_SIZE[X]
+			    && ba_request->geometry[Y]<=DIM_SIZE[Y]
+			    && ba_request->geometry[Z]<=DIM_SIZE[Z])
 				return 1;
 			else {
 				set = 0;
@@ -2794,7 +2795,7 @@ static int _check_for_options(ba_request_t* ba_request)
 			}
 		}
 	}
-	if(ba_request->elongate) {
+	if (ba_request->elongate) {
 	elongate_again:
 		debug2("Elongating! %d",ba_request->elongate_count);
 		ba_request->rotate_count=0;
@@ -2805,15 +2806,15 @@ static int _check_for_options(ba_request_t* ba_request)
 		for(set=0; set<=ba_request->elongate_count; set++)
 			geo = list_next(itr);
 		list_iterator_destroy(itr);
-		if(geo == NULL)
+		if (geo == NULL)
 			return 0;
 		ba_request->elongate_count++;
 		ba_request->geometry[X] = geo[X];
 		ba_request->geometry[Y] = geo[Y];
 		ba_request->geometry[Z] = geo[Z];
-		if(ba_request->geometry[X]<=DIM_SIZE[X]
-		   && ba_request->geometry[Y]<=DIM_SIZE[Y]
-		   && ba_request->geometry[Z]<=DIM_SIZE[Z]) {
+		if (ba_request->geometry[X]<=DIM_SIZE[X]
+		    && ba_request->geometry[Y]<=DIM_SIZE[Y]
+		    && ba_request->geometry[Z]<=DIM_SIZE[Z]) {
 			return 1;
 		} else
 			goto elongate_again;
@@ -2833,7 +2834,7 @@ static int _append_geo(uint16_t *geometry, List geos, int rotate)
 	int temp_geo;
 	int i, j;
 
-	if(rotate) {
+	if (rotate) {
 		for (i = (cluster_dims - 1); i >= 0; i--) {
 			for (j = 1; j <= i; j++) {
 				if ((geometry[j-1] > geometry[j])
@@ -2848,20 +2849,20 @@ static int _append_geo(uint16_t *geometry, List geos, int rotate)
 	}
 	itr = list_iterator_create(geos);
 	while ((geo_ptr = list_next(itr)) != NULL) {
-		if(geometry[X] == geo_ptr[X]
-		   && geometry[Y] == geo_ptr[Y]
-		   && geometry[Z] == geo_ptr[Z])
+		if (geometry[X] == geo_ptr[X]
+		    && geometry[Y] == geo_ptr[Y]
+		    && geometry[Z] == geo_ptr[Z])
 			break;
 
 	}
 	list_iterator_destroy(itr);
 
-	if(geo_ptr == NULL) {
+	if (geo_ptr == NULL) {
 		geo = xmalloc(sizeof(int)*cluster_dims);
 		geo[X] = geometry[X];
 		geo[Y] = geometry[Y];
 		geo[Z] = geometry[Z];
-		if(ba_debug_flags & DEBUG_FLAG_BG_ALGO_DEEP)
+		if (ba_debug_flags & DEBUG_FLAG_BG_ALGO_DEEP)
 			info("adding geo %c%c%c",
 			     alpha_num[geo[X]], alpha_num[geo[Y]],
 			     alpha_num[geo[Z]]);
@@ -2899,20 +2900,20 @@ static int _fill_in_coords(List results, List start_list,
 	ba_switch_t *curr_switch = NULL;
 	ba_switch_t *next_switch = NULL;
 
-	if(!start_list || !results)
+	if (!start_list || !results)
 		return 0;
 	/* go through the start_list and add all the midplanes */
 	itr = list_iterator_create(start_list);
-	while((check_node = (ba_node_t*) list_next(itr))) {
+	while ((check_node = (ba_node_t*) list_next(itr))) {
 		curr_switch = &check_node->axis_switch[X];
 
 		for(y=0; y<geometry[Y]; y++) {
-			if((check_node->coord[Y]+y) >= DIM_SIZE[Y]) {
+			if ((check_node->coord[Y]+y) >= DIM_SIZE[Y]) {
 				rc = 0;
 				goto failed;
 			}
 			for(z=0; z<geometry[Z]; z++) {
-				if((check_node->coord[Z]+z) >= DIM_SIZE[Z]) {
+				if ((check_node->coord[Z]+z) >= DIM_SIZE[Z]) {
 					rc = 0;
 					goto failed;
 				}
@@ -2921,13 +2922,14 @@ static int _fill_in_coords(List results, List start_list,
 					[check_node->coord[Y]+y]
 					[check_node->coord[Z]+z];
 
-				if(ba_node->coord[Y] == check_node->coord[Y]
-				   && ba_node->coord[Z] == check_node->coord[Z])
+				if ((ba_node->coord[Y] == check_node->coord[Y])
+				    && (ba_node->coord[Z]
+					== check_node->coord[Z]))
 					continue;
 
 				if (!_node_used(ba_node, geometry[X])) {
-					if(ba_debug_flags
-					   & DEBUG_FLAG_BG_ALGO_DEEP)
+					if (ba_debug_flags
+					    & DEBUG_FLAG_BG_ALGO_DEEP)
 						info("here Adding %c%c%c",
 						     alpha_num[ba_node->
 							       coord[X]],
@@ -2959,23 +2961,23 @@ static int _fill_in_coords(List results, List start_list,
 	list_iterator_destroy(itr);
 
 	itr = list_iterator_create(results);
-	while((ba_node = (ba_node_t*) list_next(itr))) {
-		if(!_find_yz_path(ba_node,
-				  check_node->coord,
-				  geometry,
-				  conn_type)){
+	while ((ba_node = (ba_node_t*) list_next(itr))) {
+		if (!_find_yz_path(ba_node,
+				   check_node->coord,
+				   geometry,
+				   conn_type)){
 			rc = 0;
 			goto failed;
 		}
 	}
 
-	if(deny_pass) {
-		if((*deny_pass & PASS_DENY_Y)
-		   && (*deny_pass & PASS_FOUND_Y)) {
+	if (deny_pass) {
+		if ((*deny_pass & PASS_DENY_Y)
+		    && (*deny_pass & PASS_FOUND_Y)) {
 			debug("We don't allow Y passthoughs");
 			rc = 0;
-		} else if((*deny_pass & PASS_DENY_Z)
-			  && (*deny_pass & PASS_FOUND_Z)) {
+		} else if ((*deny_pass & PASS_DENY_Z)
+			   && (*deny_pass & PASS_FOUND_Z)) {
 			debug("We don't allow Z passthoughs");
 			rc = 0;
 		}
@@ -3034,8 +3036,8 @@ static int _copy_the_path(List nodes, ba_switch_t *curr_switch,
 	/* follow the path */
 	node_curr = curr_switch->ext_wire[0].node_tar;
 	node_tar = curr_switch->ext_wire[port_tar].node_tar;
-	if(mark_switch->int_wire[source].used)
-		if(ba_debug_flags & DEBUG_FLAG_BG_ALGO)
+	if (mark_switch->int_wire[source].used)
+		if (ba_debug_flags & DEBUG_FLAG_BG_ALGO)
 			info("setting dim %d %c%c%c %d-> %c%c%c %d",
 			     dim,
 			     alpha_num[node_curr[X]],
@@ -3047,7 +3049,7 @@ static int _copy_the_path(List nodes, ba_switch_t *curr_switch,
 			     alpha_num[node_tar[Z]],
 			     port_tar);
 
-	if(port_tar == 1) {
+	if (port_tar == 1) {
 		/* found the end of the line */
 		mark_switch->int_wire[1].used =
 			curr_switch->int_wire[1].used;
@@ -3059,9 +3061,9 @@ static int _copy_the_path(List nodes, ba_switch_t *curr_switch,
 	mark_node_tar = mark_switch->ext_wire[port_tar].node_tar;
 	port_tar = curr_switch->ext_wire[port_tar].port_tar;
 
-	if(node_curr[X] == node_tar[X]
-	   && node_curr[Y] == node_tar[Y]
-	   && node_curr[Z] == node_tar[Z]) {
+	if (node_curr[X] == node_tar[X]
+	    && node_curr[Y] == node_tar[Y]
+	    && node_curr[Z] == node_tar[Z]) {
 		/* We are going to the same node! this should never
 		   happen */
 		debug5("something bad happened!! "
@@ -3077,7 +3079,7 @@ static int _copy_the_path(List nodes, ba_switch_t *curr_switch,
 	/* see what the next switch is going to be */
 	next_switch = &ba_system_ptr->
 		grid[node_tar[X]][node_tar[Y]][node_tar[Z]].axis_switch[dim];
-	if(!nodes) {
+	if (!nodes) {
 		/* If no nodes then just get the next switch to fill
 		   in from the main system */
 		next_mark_switch = &ba_system_ptr->
@@ -3089,14 +3091,14 @@ static int _copy_the_path(List nodes, ba_switch_t *curr_switch,
 		ba_node_t *ba_node = NULL;
 		ListIterator itr = list_iterator_create(nodes);
 		/* see if we have already been to this node */
-		while((ba_node = list_next(itr))) {
+		while ((ba_node = list_next(itr))) {
 			if (ba_node->coord[X] == mark_node_tar[X] &&
 			    ba_node->coord[Y] == mark_node_tar[Y] &&
 			    ba_node->coord[Z] == mark_node_tar[Z])
 				break;	/* we found it */
 		}
 		list_iterator_destroy(itr);
-		if(!ba_node) {
+		if (!ba_node) {
 			/* If node grab a copy and add it to the list */
 			ba_node = ba_copy_node(&ba_system_ptr->
 					       grid[mark_node_tar[X]]
@@ -3104,7 +3106,7 @@ static int _copy_the_path(List nodes, ba_switch_t *curr_switch,
 					       [mark_node_tar[Z]]);
 			_new_ba_node(ba_node, mark_node_tar, false);
 			list_push(nodes, ba_node);
-			if(ba_debug_flags & DEBUG_FLAG_BG_ALGO_DEEP)
+			if (ba_debug_flags & DEBUG_FLAG_BG_ALGO_DEEP)
 				info("haven't seen %c%c%c adding it",
 				     alpha_num[ba_node->coord[X]],
 				     alpha_num[ba_node->coord[Y]],
@@ -3130,8 +3132,8 @@ static int _find_yz_path(ba_node_t *ba_node, uint16_t *first,
 	int count = 0;
 
 	for(i2=1;i2<=2;i2++) {
-		if(geometry[i2] > 1) {
-			if(ba_debug_flags & DEBUG_FLAG_BG_ALGO_DEEP)
+		if (geometry[i2] > 1) {
+			if (ba_debug_flags & DEBUG_FLAG_BG_ALGO_DEEP)
 				info("%d node %c%c%c port 2 -> ",
 				     i2,
 				     alpha_num[ba_node->coord[X]],
@@ -3139,7 +3141,7 @@ static int _find_yz_path(ba_node_t *ba_node, uint16_t *first,
 				     alpha_num[ba_node->coord[Z]]);
 
 			dim_curr_switch = &ba_node->axis_switch[i2];
-			if(dim_curr_switch->int_wire[2].used) {
+			if (dim_curr_switch->int_wire[2].used) {
 				debug5("returning here");
 				return 0;
 			}
@@ -3149,14 +3151,14 @@ static int _find_yz_path(ba_node_t *ba_node, uint16_t *first,
 			next_node = &ba_system_ptr->
 				grid[node_tar[X]][node_tar[Y]][node_tar[Z]];
 			dim_next_switch = &next_node->axis_switch[i2];
-			if(ba_debug_flags & DEBUG_FLAG_BG_ALGO_DEEP)
+			if (ba_debug_flags & DEBUG_FLAG_BG_ALGO_DEEP)
 				info("%c%c%c port 5",
 				     alpha_num[next_node->coord[X]],
 				     alpha_num[next_node->coord[Y]],
 				     alpha_num[next_node->coord[Z]]);
 
-			if(dim_next_switch->int_wire[5].used) {
-				if(ba_debug_flags & DEBUG_FLAG_BG_ALGO)
+			if (dim_next_switch->int_wire[5].used) {
+				if (ba_debug_flags & DEBUG_FLAG_BG_ALGO)
 					info("returning here 2");
 				return 0;
 			}
@@ -3171,17 +3173,17 @@ static int _find_yz_path(ba_node_t *ba_node, uint16_t *first,
 			 * we need then we go through and finish the
 			 * torus if needed
 			 */
-			if(node_tar[i2] < first[i2])
+			if (node_tar[i2] < first[i2])
 				count = node_tar[i2]+(DIM_SIZE[i2]-first[i2]);
 			else
 				count = (node_tar[i2]-first[i2]);
 
-			if(count == geometry[i2]) {
+			if (count == geometry[i2]) {
 				debug5("found end of me %c%c%c",
 				       alpha_num[node_tar[X]],
 				       alpha_num[node_tar[Y]],
 				       alpha_num[node_tar[Z]]);
-				if(conn_type == SELECT_TORUS) {
+				if (conn_type == SELECT_TORUS) {
 					dim_curr_switch->int_wire[0].used = 1;
 					dim_curr_switch->int_wire[0].port_tar
 						= 2;
@@ -3190,30 +3192,30 @@ static int _find_yz_path(ba_node_t *ba_node, uint16_t *first,
 						= 0;
 					dim_curr_switch = dim_next_switch;
 
-					if(deny_pass
-					   && (node_tar[i2] != first[i2])) {
-						if(i2 == 1)
+					if (deny_pass
+					    && (node_tar[i2] != first[i2])) {
+						if (i2 == 1)
 							*deny_pass |=
 								PASS_FOUND_Y;
 						else
 							*deny_pass |=
 								PASS_FOUND_Z;
 					}
-					while(node_tar[i2] != first[i2]) {
-						if(ba_debug_flags
-						   & DEBUG_FLAG_BG_ALGO_DEEP)
+					while (node_tar[i2] != first[i2]) {
+						if (ba_debug_flags
+						    & DEBUG_FLAG_BG_ALGO_DEEP)
 							info("on dim %d at %d "
 							     "looking for %d",
 							     i2,
 							     node_tar[i2],
 							     first[i2]);
 
-						if(dim_curr_switch->
-						   int_wire[2].used) {
-							if(ba_debug_flags
-							   & DEBUG_FLAG_BG_ALGO_DEEP)
-								info("returning "
-								     "here 3");
+						if (dim_curr_switch->
+						    int_wire[2].used) {
+							if (ba_debug_flags
+							    & DEBUG_FLAG_BG_ALGO_DEEP)
+								info("returning"
+								     " here 3");
 							return 0;
 						}
 
@@ -3242,8 +3244,8 @@ static int _find_yz_path(ba_node_t *ba_node, uint16_t *first,
 							axis_switch[i2];
 					}
 
-					if(ba_debug_flags
-					   & DEBUG_FLAG_BG_ALGO_DEEP)
+					if (ba_debug_flags
+					    & DEBUG_FLAG_BG_ALGO_DEEP)
 						info("back to first on dim %d "
 						     "at %d looking for %d",
 						     i2,
@@ -3264,9 +3266,9 @@ static int _find_yz_path(ba_node_t *ba_node, uint16_t *first,
 				}
 
 			} else if (count < geometry[i2]) {
-				if(conn_type == SELECT_TORUS ||
-				   (conn_type == SELECT_MESH &&
-				    (node_tar[i2] != first[i2]))) {
+				if (conn_type == SELECT_TORUS ||
+				    (conn_type == SELECT_MESH &&
+				     (node_tar[i2] != first[i2]))) {
 					dim_curr_switch->
 						int_wire[0].used = 1;
 					dim_curr_switch->
@@ -3296,7 +3298,7 @@ static int _find_yz_path(ba_node_t *ba_node, uint16_t *first,
 				      geometry[i2], i2, count);
 				return 0;
 			}
-		} else if((geometry[i2] == 1) && (conn_type == SELECT_TORUS)) {
+		} else if ((geometry[i2] == 1) && (conn_type == SELECT_TORUS)) {
 			/* FIX ME: This is put here because we got
 			   into a state where the Y dim was not being
 			   processed correctly.  This will set up the
@@ -3315,7 +3317,7 @@ static int _find_yz_path(ba_node_t *ba_node, uint16_t *first,
 			*/
 
 			dim_curr_switch = &ba_node->axis_switch[i2];
-			if(ba_debug_flags & DEBUG_FLAG_BG_ALGO_DEEP)
+			if (ba_debug_flags & DEBUG_FLAG_BG_ALGO_DEEP)
 				info("%d node %c%c%c port 0 -> 1",
 				     i2,
 				     alpha_num[ba_node->coord[X]],
@@ -3336,10 +3338,10 @@ static int _emulate_ext_wiring(ba_node_t ***grid)
 {
 	int x;
 	ba_node_t *source = NULL, *target = NULL;
-	if(cluster_dims == 1) {
+	if (cluster_dims == 1) {
 		for(x=0;x<DIM_SIZE[X];x++) {
 			source = &grid[x][0][0];
-			if(x<(DIM_SIZE[X]-1))
+			if (x<(DIM_SIZE[X]-1))
 				target = &grid[x+1][0][0];
 			else
 				target = &grid[0][0][0];
@@ -3354,7 +3356,7 @@ static int _emulate_ext_wiring(ba_node_t ***grid)
 				for(z=0;z<DIM_SIZE[Z];z++) {
 					source = &grid[x][y][z];
 
-					if(x<(DIM_SIZE[X]-1)) {
+					if (x<(DIM_SIZE[X]-1)) {
 						target = &grid[x+1][y][z];
 					} else
 						target = &grid[0][y][z];
@@ -3362,14 +3364,14 @@ static int _emulate_ext_wiring(ba_node_t ***grid)
 					_set_external_wires(X, x, source,
 							    target);
 
-					if(y<(DIM_SIZE[Y]-1))
+					if (y<(DIM_SIZE[Y]-1))
 						target = &grid[x][y+1][z];
 					else
 						target = &grid[x][0][z];
 
 					_set_external_wires(Y, y, source,
 							    target);
-					if(z<(DIM_SIZE[Z]-1))
+					if (z<(DIM_SIZE[Z]-1))
 						target = &grid[x][y][z+1];
 					else
 						target = &grid[x][y][0];
@@ -3393,26 +3395,26 @@ static int _reset_the_path(ba_switch_t *curr_switch, int source,
 	int port_tar, port_tar1;
 	ba_switch_t *next_switch = NULL;
 
-	if(source < 0 || source > NUM_PORTS_PER_NODE) {
+	if (source < 0 || source > NUM_PORTS_PER_NODE) {
 		fatal("source port was %d can only be 0->%d",
 		      source, NUM_PORTS_PER_NODE);
 	}
-	if(target < 0 || target > NUM_PORTS_PER_NODE) {
+	if (target < 0 || target > NUM_PORTS_PER_NODE) {
 		fatal("target port was %d can only be 0->%d",
 		      target, NUM_PORTS_PER_NODE);
 	}
 	/*set the switch to not be used */
-	if(!curr_switch->int_wire[source].used) {
+	if (!curr_switch->int_wire[source].used) {
 		/* This means something overlapping the removing block
 		   already cleared this, or the path just never was
 		   complete in the first place. */
-		if(ba_debug_flags & DEBUG_FLAG_BG_ALGO)
+		if (ba_debug_flags & DEBUG_FLAG_BG_ALGO)
 			info("I reached the end, the source isn't used");
 		return 1;
 	}
 	curr_switch->int_wire[source].used = 0;
 	port_tar = curr_switch->int_wire[source].port_tar;
-	if(port_tar < 0 || port_tar > NUM_PORTS_PER_NODE) {
+	if (port_tar < 0 || port_tar > NUM_PORTS_PER_NODE) {
 		fatal("port_tar port was %d can only be 0->%d",
 		      source, NUM_PORTS_PER_NODE);
 	}
@@ -3421,14 +3423,14 @@ static int _reset_the_path(ba_switch_t *curr_switch, int source,
 	curr_switch->int_wire[source].port_tar = source;
 	curr_switch->int_wire[port_tar].used = 0;
 	curr_switch->int_wire[port_tar].port_tar = port_tar;
-	if(port_tar==target) {
+	if (port_tar==target) {
 		return 1;
 	}
 	/* follow the path */
 	node_curr = curr_switch->ext_wire[0].node_tar;
 	node_tar = curr_switch->ext_wire[port_tar].node_tar;
 	port_tar = curr_switch->ext_wire[port_tar].port_tar;
-	if(source == port_tar1) {
+	if (source == port_tar1) {
 		debug("got this bad one %c%c%c %d %d -> %c%c%c %d",
 		      alpha_num[node_curr[X]],
 		      alpha_num[node_curr[Y]],
@@ -3451,9 +3453,9 @@ static int _reset_the_path(ba_switch_t *curr_switch, int source,
 	       alpha_num[node_tar[Y]],
 	       alpha_num[node_tar[Z]],
 	       port_tar);
-	if(node_curr[X] == node_tar[X]
-	   && node_curr[Y] == node_tar[Y]
-	   && node_curr[Z] == node_tar[Z]) {
+	if (node_curr[X] == node_tar[X]
+	    && node_curr[Y] == node_tar[Y]
+	    && node_curr[Z] == node_tar[Z]) {
 		debug5("%d something bad happened!!", dim);
 		return 0;
 	}
@@ -3464,13 +3466,14 @@ static int _reset_the_path(ba_switch_t *curr_switch, int source,
 //	return 1;
 }
 
-static void _new_ba_node(ba_node_t *ba_node, uint16_t *coord, bool track_down_nodes)
+static void _new_ba_node(ba_node_t *ba_node, uint16_t *coord,
+			 bool track_down_nodes)
 {
 	int i,j;
 	uint16_t node_base_state = ba_node->state & NODE_STATE_BASE;
 
-	if(((node_base_state != NODE_STATE_DOWN)
-	    && !(ba_node->state & NODE_STATE_DRAIN)) || !track_down_nodes)
+	if (((node_base_state != NODE_STATE_DOWN)
+	     && !(ba_node->state & NODE_STATE_DRAIN)) || !track_down_nodes)
 		ba_node->used = false;
 
 	for (i=0; i<cluster_dims; i++){
@@ -3478,8 +3481,8 @@ static void _new_ba_node(ba_node_t *ba_node, uint16_t *coord, bool track_down_no
 
 		for(j=0;j<NUM_PORTS_PER_NODE;j++) {
 			ba_node->axis_switch[i].int_wire[j].used = 0;
-			if(i!=X) {
-				if(j==3 || j==4)
+			if (i!=X) {
+				if (j==3 || j==4)
 					ba_node->axis_switch[i].int_wire[j].
 						used = 1;
 			}
@@ -3522,7 +3525,7 @@ static void _delete_ba_system(void)
 		return;
 	}
 
-	if(ba_system_ptr->grid) {
+	if (ba_system_ptr->grid) {
 		for (x=0; x<DIM_SIZE[X]; x++) {
 			for (y=0; y<DIM_SIZE[Y]; y++)
 				xfree(ba_system_ptr->grid[x][y]);
@@ -3556,17 +3559,17 @@ static int _find_match(ba_request_t *ba_request, List results)
 	int startx;
 	uint16_t *geo_ptr;
 
-	if(!(cluster_flags & CLUSTER_FLAG_BG))
+	if (!(cluster_flags & CLUSTER_FLAG_BG))
 		return 0;
 
 	memset(start, 0, sizeof(start));
 	startx = (start[X]-1);
 
-	if(startx == -1)
+	if (startx == -1)
 		startx = DIM_SIZE[X]-1;
-	if(ba_request->start_req) {
+	if (ba_request->start_req) {
 		for(x=0;x<cluster_dims;x++) {
-			if(ba_request->start[x]>=DIM_SIZE[x])
+			if (ba_request->start[x]>=DIM_SIZE[x])
 				return 0;
 			start[x] = ba_request->start[x];
 		}
@@ -3574,7 +3577,7 @@ static int _find_match(ba_request_t *ba_request, List results)
 	x=0;
 
 	/* set up the geo here */
-	if(!(geo_ptr = list_peek(ba_request->elongate_geos)))
+	if (!(geo_ptr = list_peek(ba_request->elongate_geos)))
 		return 0;
 	ba_request->rotate_count=0;
 	ba_request->elongate_count=1;
@@ -3582,26 +3585,26 @@ static int _find_match(ba_request_t *ba_request, List results)
 	ba_request->geometry[Y] = geo_ptr[Y];
 	ba_request->geometry[Z] = geo_ptr[Z];
 
-	if(ba_request->geometry[X]>DIM_SIZE[X]
-	   || ba_request->geometry[Y]>DIM_SIZE[Y]
-	   || ba_request->geometry[Z]>DIM_SIZE[Z])
-		if(!_check_for_options(ba_request))
+	if (ba_request->geometry[X]>DIM_SIZE[X]
+	    || ba_request->geometry[Y]>DIM_SIZE[Y]
+	    || ba_request->geometry[Z]>DIM_SIZE[Z])
+		if (!_check_for_options(ba_request))
 			return 0;
 
 start_again:
 	x=0;
-	if(x == startx)
+	if (x == startx)
 		x = startx-1;
-	while(x!=startx) {
+	while (x!=startx) {
 		x++;
-		if(ba_debug_flags & DEBUG_FLAG_BG_ALGO_DEEP)
+		if (ba_debug_flags & DEBUG_FLAG_BG_ALGO_DEEP)
 			info("finding %c%c%c try %d",
 			     alpha_num[ba_request->geometry[X]],
 			     alpha_num[ba_request->geometry[Y]],
 			     alpha_num[ba_request->geometry[Z]],
 			     x);
 	new_node:
-		if(ba_debug_flags & DEBUG_FLAG_BG_ALGO)
+		if (ba_debug_flags & DEBUG_FLAG_BG_ALGO)
 			info("starting at %c%c%c",
 			     alpha_num[start[X]],
 			     alpha_num[start[Y]],
@@ -3610,7 +3613,7 @@ start_again:
 		ba_node = &ba_system_ptr->grid[start[X]][start[Y]][start[Z]];
 
 		if (!_node_used(ba_node, ba_request->geometry[X])) {
-			if(ba_debug_flags & DEBUG_FLAG_BG_ALGO_DEEP)
+			if (ba_debug_flags & DEBUG_FLAG_BG_ALGO_DEEP)
 				info("trying this node %c%c%c %c%c%c %d",
 				     alpha_num[start[X]],
 				     alpha_num[start[Y]],
@@ -3623,32 +3626,32 @@ start_again:
 					    start,
 					    ba_request->geometry,
 					    ba_request->conn_type);
-			if(name) {
+			if (name) {
 				ba_request->save_name = xstrdup(name);
 				xfree(name);
 				return 1;
 			}
 
-			if(results) {
+			if (results) {
 				remove_block(results, color_count,
 					     ba_request->conn_type);
 				list_delete_all(results,
 						&empty_null_destroy_list, "");
 			}
-			if(ba_request->start_req)
+			if (ba_request->start_req)
 				goto requested_end;
 			//exit(0);
 			debug2("trying something else");
 
 		}
 
-		if((DIM_SIZE[Z]-start[Z]-1)
-		   >= ba_request->geometry[Z])
+		if ((DIM_SIZE[Z]-start[Z]-1)
+		    >= ba_request->geometry[Z])
 			start[Z]++;
 		else {
 			start[Z] = 0;
-			if((DIM_SIZE[Y]-start[Y]-1)
-			   >= ba_request->geometry[Y])
+			if ((DIM_SIZE[Y]-start[Y]-1)
+			    >= ba_request->geometry[Y])
 				start[Y]++;
 			else {
 				start[Y] = 0;
@@ -3656,9 +3659,9 @@ start_again:
 				    >= ba_request->geometry[X])
 					start[X]++;
 				else {
-					if(ba_request->size == 1)
+					if (ba_request->size == 1)
 						goto requested_end;
-					if(!_check_for_options(ba_request))
+					if (!_check_for_options(ba_request))
 						return 0;
 					else {
 						start[X]=0;
@@ -3689,7 +3692,7 @@ static bool _node_used(ba_node_t* ba_node, int x_size)
 	ba_switch_t* ba_switch = NULL;
 	/* if we've used this node in another block already */
 	if (!ba_node || ba_node->used) {
-		if(ba_debug_flags & DEBUG_FLAG_BG_ALGO_DEEP)
+		if (ba_debug_flags & DEBUG_FLAG_BG_ALGO_DEEP)
 			info("node %c%c%c used",
 			     alpha_num[ba_node->coord[X]],
 			     alpha_num[ba_node->coord[Y]],
@@ -3702,7 +3705,7 @@ static bool _node_used(ba_node_t* ba_node, int x_size)
 	   can be set up to do all the dim's if in the future if it is
 	   needed. We only need to check this if we are planning on
 	   using more than 1 midplane in the block creation */
-	if(x_size > 1) {
+	if (x_size > 1) {
 		/* get the switch of the X Dimension */
 		ba_switch = &ba_node->axis_switch[X];
 
@@ -3711,8 +3714,9 @@ static bool _node_used(ba_node_t* ba_node, int x_size)
 		   can use since these can not connect to each
 		   other they must be connected to the other ports.
 		*/
-		if(ba_switch->int_wire[3].used && ba_switch->int_wire[5].used) {
-			if(ba_debug_flags & DEBUG_FLAG_BG_ALGO_DEEP)
+		if (ba_switch->int_wire[3].used
+		    && ba_switch->int_wire[5].used) {
+			if (ba_debug_flags & DEBUG_FLAG_BG_ALGO_DEEP)
 				info("switch full in the X dim on node %c%c%c!",
 				     alpha_num[ba_node->coord[X]],
 				     alpha_num[ba_node->coord[Y]],
@@ -3781,7 +3785,7 @@ static int _set_external_wires(int dim, int count, ba_node_t* source,
 	char from_node[NODE_LEN];
 	char to_node[NODE_LEN];
 
-	if(working_cluster_rec) {
+	if (working_cluster_rec) {
 		error("Can't do this cross-cluster");
 		return -1;
 	}
@@ -3791,7 +3795,7 @@ static int _set_external_wires(int dim, int count, ba_node_t* source,
 	}
 
 	if (!bg) {
-		if((rc = bridge_get_bg(&bg)) != STATUS_OK) {
+		if ((rc = bridge_get_bg(&bg)) != STATUS_OK) {
 			error("bridge_get_BG(): %d", rc);
 			return -1;
 		}
@@ -3827,12 +3831,12 @@ static int _set_external_wires(int dim, int count, ba_node_t* source,
 			break;
 		}
 
-		if(!wire_id) {
+		if (!wire_id) {
 			error("No Wire ID was returned from database");
 			continue;
 		}
 
-		if(wire_id[UNDER_POS] != '_')
+		if (wire_id[UNDER_POS] != '_')
 			continue;
 		switch(wire_id[0]) {
 		case 'X':
@@ -3845,7 +3849,7 @@ static int _set_external_wires(int dim, int count, ba_node_t* source,
 			dim = Z;
 			break;
 		}
-		if(strlen(wire_id) < VAL_NAME_LEN) {
+		if (strlen(wire_id) < VAL_NAME_LEN) {
 			error("Wire_id isn't correct %s",wire_id);
 			continue;
 		}
@@ -3878,21 +3882,21 @@ static int _set_external_wires(int dim, int count, ba_node_t* source,
 		}
 
 		coord = find_bp_loc(from_node);
-		if(!coord) {
+		if (!coord) {
 			error("1 find_bp_loc: bpid %s not known", from_node);
 			continue;
 		}
-		if(!validate_coord(coord))
+		if (!validate_coord(coord))
 			continue;
 
 		source = &ba_system_ptr->
 			grid[coord[X]][coord[Y]][coord[Z]];
 		coord = find_bp_loc(to_node);
-		if(!coord) {
+		if (!coord) {
 			error("2 find_bp_loc: bpid %s not known", to_node);
 			continue;
 		}
-		if(!validate_coord(coord))
+		if (!validate_coord(coord))
 			continue;
 
 		target = &ba_system_ptr->
@@ -3903,7 +3907,7 @@ static int _set_external_wires(int dim, int count, ba_node_t* source,
 			       _port_enum(from_port),
 			       _port_enum(to_port));
 
-		if(ba_debug_flags & DEBUG_FLAG_BG_ALGO)
+		if (ba_debug_flags & DEBUG_FLAG_BG_ALGO)
 			info("dim %d from %c%c%c %d -> %c%c%c %d",
 			     dim,
 			     alpha_num[source->coord[X]],
@@ -3918,17 +3922,17 @@ static int _set_external_wires(int dim, int count, ba_node_t* source,
 #else
 	_switch_config(source, source, dim, 0, 0);
 	_switch_config(source, source, dim, 1, 1);
-	if(dim!=X) {
+	if (dim!=X) {
 		_switch_config(source, target, dim, 2, 5);
 		_switch_config(source, source, dim, 3, 3);
 		_switch_config(source, source, dim, 4, 4);
 		return 1;
 	}
 
-	if(cluster_dims == 1) {
-		if(count == 0)
+	if (cluster_dims == 1) {
+		if (count == 0)
 			_switch_config(source, source, dim, 5, 5);
-		else if(count < DIM_SIZE[X]-1)
+		else if (count < DIM_SIZE[X]-1)
 			_switch_config(source, target, dim, 2, 5);
 		else
 			_switch_config(source, source, dim, 2, 2);
@@ -3942,8 +3946,8 @@ static int _set_external_wires(int dim, int count, ba_node_t* source,
 	_switch_config(source, target, dim, 2, 5);
 
 	/* set up split x */
-	if(DIM_SIZE[X] == 1) {
-	} else if(DIM_SIZE[X] == 4) {
+	if (DIM_SIZE[X] == 1) {
+	} else if (DIM_SIZE[X] == 4) {
 		switch(count) {
 		case 0:
 		case 3:
@@ -3972,7 +3976,7 @@ static int _set_external_wires(int dim, int count, ba_node_t* source,
 			      count, DIM_SIZE[X]);
 			break;
 		}
-	} else if(DIM_SIZE[X] == 5) {
+	} else if (DIM_SIZE[X] == 5) {
 		/* 4 X dim fixes for wires */
 		switch(count) {
 		case 0:
@@ -4014,7 +4018,7 @@ static int _set_external_wires(int dim, int count, ba_node_t* source,
 			      count, DIM_SIZE[X]);
 			break;
 		}
-	} else if(DIM_SIZE[X] == 8) {
+	} else if (DIM_SIZE[X] == 8) {
 		switch(count) {
 		case 0:
 		case 4:
@@ -4067,7 +4071,7 @@ static int _set_external_wires(int dim, int count, ba_node_t* source,
 			      count, DIM_SIZE[X]);
 			break;
 		}
-	} else if(DIM_SIZE[X] == 9) {
+	} else if (DIM_SIZE[X] == 9) {
 		switch(count) {
 		case 0:
 		case 4:
@@ -4118,7 +4122,7 @@ static int _set_external_wires(int dim, int count, ba_node_t* source,
 			      count, DIM_SIZE[X]);
 			break;
 		}
-	} else if(DIM_SIZE[X] == 13) {
+	} else if (DIM_SIZE[X] == 13) {
 		int temp_num = 0;
 
 		switch(count) {
@@ -4144,7 +4148,7 @@ static int _set_external_wires(int dim, int count, ba_node_t* source,
 			 * from 4->3 and back again
 			 */
 			temp_num = 12 - (count - 1);
-			if(temp_num < 5)
+			if (temp_num < 5)
 				fatal("node %d shouldn't go to %d",
 				      count, temp_num);
 
@@ -4216,7 +4220,7 @@ static char *_set_internal_wires(List nodes, int size, int conn_type)
 			if (ba_node[i]->letter == '.') {
 				ba_node[i]->letter = letters[color_count%62];
 				ba_node[i]->color = colors[color_count%6];
-				if(ba_debug_flags & DEBUG_FLAG_BG_ALGO_DEEP)
+				if (ba_debug_flags & DEBUG_FLAG_BG_ALGO_DEEP)
 					info("count %d setting letter = %c "
 					     "color = %d",
 					     color_count,
@@ -4283,16 +4287,16 @@ static int _find_x_path(List results, ba_node_t *ba_node,
 
 	ListIterator itr = NULL;
 
-	if(!ba_node || !results || !start)
+	if (!ba_node || !results || !start)
 		return 0;
 
 	curr_switch = &ba_node->axis_switch[X];
 
 	/* we don't need to go any further */
-	if(x_size == 1) {
+	if (x_size == 1) {
 		/* Only set this if Torus since mesh doesn't have any
 		 * connections in this path */
-		if(conn_type == SELECT_TORUS) {
+		if (conn_type == SELECT_TORUS) {
 			curr_switch->int_wire[source_port].used = 1;
 			curr_switch->int_wire[source_port].port_tar =
 				target_port;
@@ -4303,10 +4307,10 @@ static int _find_x_path(List results, ba_node_t *ba_node,
 		return 1;
 	}
 
-	if(algo == BLOCK_ALGO_FIRST) {
+	if (algo == BLOCK_ALGO_FIRST) {
 		ports_to_try[0] = 4;
 		ports_to_try[1] = 2;
-	} else if(algo == BLOCK_ALGO_SECOND) {
+	} else if (algo == BLOCK_ALGO_SECOND) {
 		ports_to_try[0] = 2;
 		ports_to_try[1] = 4;
 	} else {
@@ -4314,14 +4318,14 @@ static int _find_x_path(List results, ba_node_t *ba_node,
 		return 0;
 	}
 
-	if(ba_debug_flags & DEBUG_FLAG_BG_ALGO_DEEP)
+	if (ba_debug_flags & DEBUG_FLAG_BG_ALGO_DEEP)
 		info("Algo(%d) found - %d", algo, found);
 
 	/* Check the 2 ports we can leave though in ports_to_try */
 	for(i=0;i<2;i++) {
 /* 		info("trying port %d", ports_to_try[i]); */
 		/* check to make sure it isn't used */
-		if(!curr_switch->int_wire[ports_to_try[i]].used) {
+		if (!curr_switch->int_wire[ports_to_try[i]].used) {
 			/* looking at the next node on the switch
 			   and it's port we are going to */
 			node_tar = curr_switch->
@@ -4339,23 +4343,23 @@ static int _find_x_path(List results, ba_node_t *ba_node,
 /* 			     port_tar); */
 			/* check to see if we are back at the start of the
 			   block */
-			if((node_tar[X] == start[X]
-			    && node_tar[Y] == start[Y]
-			    && node_tar[Z] == start[Z])) {
+			if ((node_tar[X] == start[X]
+			     && node_tar[Y] == start[Y]
+			     && node_tar[Z] == start[Z])) {
 				broke = 1;
 				goto broke_it;
 			}
 			/* check to see if the port points to itself */
-			if((node_tar[X] == ba_node->coord[X]
-			    && node_tar[Y] == ba_node->coord[Y]
-			    && node_tar[Z] == ba_node->coord[Z])) {
+			if ((node_tar[X] == ba_node->coord[X]
+			     && node_tar[Y] == ba_node->coord[Y]
+			     && node_tar[Z] == ba_node->coord[Z])) {
 				continue;
 			}
 			/* check to see if I am going to a place I have
 			   already been before */
 			itr = list_iterator_create(results);
-			while((next_node = list_next(itr))) {
-				if(ba_debug_flags & DEBUG_FLAG_BG_ALGO_DEEP)
+			while ((next_node = list_next(itr))) {
+				if (ba_debug_flags & DEBUG_FLAG_BG_ALGO_DEEP)
 					info("Algo(%d) looking at %c%c%c "
 					     "and %c%c%c",
 					     algo,
@@ -4365,16 +4369,16 @@ static int _find_x_path(List results, ba_node_t *ba_node,
 					     alpha_num[node_tar[X]],
 					     alpha_num[node_tar[Y]],
 					     alpha_num[node_tar[Z]]);
-				if((node_tar[X] == next_node->coord[X]
-				    && node_tar[Y] == next_node->coord[Y]
-				    && node_tar[Z] == next_node->coord[Z])) {
+				if ((node_tar[X] == next_node->coord[X]
+				     && node_tar[Y] == next_node->coord[Y]
+				     && node_tar[Z] == next_node->coord[Z])) {
 					not_first = 1;
 					break;
 				}
 			}
 			list_iterator_destroy(itr);
-			if(not_first && found < DIM_SIZE[X]) {
-				if(ba_debug_flags & DEBUG_FLAG_BG_ALGO)
+			if (not_first && found < DIM_SIZE[X]) {
+				if (ba_debug_flags & DEBUG_FLAG_BG_ALGO)
 					info("Algo(%d) already been there "
 					     "before", algo);
 				not_first = 0;
@@ -4388,36 +4392,36 @@ static int _find_x_path(List results, ba_node_t *ba_node,
 				[node_tar[Z]];
 			next_switch = &next_node->axis_switch[X];
 
- 			if((conn_type == SELECT_MESH) && (found == (x_size))) {
-				if(ba_debug_flags & DEBUG_FLAG_BG_ALGO)
+ 			if ((conn_type == SELECT_MESH) && (found == (x_size))) {
+				if (ba_debug_flags & DEBUG_FLAG_BG_ALGO)
 					info("Algo(%d) we found the end of "
 					     "the mesh", algo);
 				return 1;
 			}
-			if(ba_debug_flags & DEBUG_FLAG_BG_ALGO_DEEP)
+			if (ba_debug_flags & DEBUG_FLAG_BG_ALGO_DEEP)
 				info("Algo(%d) Broke = %d Found = %d "
 				     "x_size = %d",
 				     algo, broke, found, x_size);
 
-			if(broke && (found == x_size)) {
+			if (broke && (found == x_size)) {
 				goto found_path;
-			} else if(found == x_size) {
-				if(ba_debug_flags & DEBUG_FLAG_BG_ALGO)
+			} else if (found == x_size) {
+				if (ba_debug_flags & DEBUG_FLAG_BG_ALGO)
 					info("Algo(%d) finishing the torus!",
 					     algo);
 
-				if(deny_pass && (*deny_pass & PASS_DENY_X)) {
+				if (deny_pass && (*deny_pass & PASS_DENY_X)) {
 					info("we don't allow passthroughs 1");
 					return 0;
 				}
 
-				if(best_path)
+				if (best_path)
 					list_flush(best_path);
 				else
 					best_path =
 						list_create(_delete_path_list);
 
-				if(path)
+				if (path)
 					list_flush(path);
 				else
 					path = list_create(_delete_path_list);
@@ -4425,23 +4429,23 @@ static int _find_x_path(List results, ba_node_t *ba_node,
 				_finish_torus(results,
 					      curr_switch, 0, X, 0, start);
 
-				if(best_count < BEST_COUNT_INIT) {
-					if(ba_debug_flags & DEBUG_FLAG_BG_ALGO)
-						info("Algo(%d) Found a best path "
-						     "with %d steps.",
+				if (best_count < BEST_COUNT_INIT) {
+					if (ba_debug_flags & DEBUG_FLAG_BG_ALGO)
+						info("Algo(%d) Found a best "
+						     "path with %d steps.",
 						     algo, best_count);
 					_set_best_path();
 					return 1;
 				} else {
 					return 0;
 				}
-			} else if(broke) {
+			} else if (broke) {
 				broke = 0;
 				continue;
 			}
 
 			if (!_node_used(next_node, x_size)) {
-				if(ba_debug_flags & DEBUG_FLAG_BG_ALGO)
+				if (ba_debug_flags & DEBUG_FLAG_BG_ALGO)
 					info("Algo(%d) found %d looking at "
 					     "%c%c%c %d going to %c%c%c %d",
 					     algo,
@@ -4455,18 +4459,18 @@ static int _find_x_path(List results, ba_node_t *ba_node,
 					     alpha_num[node_tar[Z]],
 					     port_tar);
 				itr = list_iterator_create(results);
-				while((check_node = list_next(itr))) {
-					if((node_tar[X] == check_node->coord[X]
-					    && node_tar[Y] ==
-					    check_node->coord[Y]
-					    && node_tar[Z] ==
-					    check_node->coord[Z])) {
+				while ((check_node = list_next(itr))) {
+					if ((node_tar[X] == check_node->coord[X]
+					     && node_tar[Y] ==
+					     check_node->coord[Y]
+					     && node_tar[Z] ==
+					     check_node->coord[Z])) {
 						break;
 					}
 				}
 				list_iterator_destroy(itr);
-				if(!check_node) {
-					if(ba_debug_flags & DEBUG_FLAG_BG_ALGO)
+				if (!check_node) {
+					if (ba_debug_flags & DEBUG_FLAG_BG_ALGO)
 						info("Algo(%d) add %c%c%c",
 						     algo,
 						     alpha_num[next_node->
@@ -4477,7 +4481,7 @@ static int _find_x_path(List results, ba_node_t *ba_node,
 							       coord[Z]]);
 					list_append(results, next_node);
 				} else {
-					if(ba_debug_flags & DEBUG_FLAG_BG_ALGO)
+					if (ba_debug_flags & DEBUG_FLAG_BG_ALGO)
 						info("Algo(%d) Hey this is "
 						     "already added %c%c%c",
 						     algo,
@@ -4489,15 +4493,15 @@ static int _find_x_path(List results, ba_node_t *ba_node,
 				found++;
 
 				/* look for the next closest midplane */
-				if(!_find_x_path(results, next_node,
-						 start, x_size,
-						 found, conn_type, algo)) {
+				if (!_find_x_path(results, next_node,
+						  start, x_size,
+						  found, conn_type, algo)) {
 					_remove_node(results, next_node->coord);
 					found--;
 					continue;
 				} else {
 				found_path:
-					if(ba_debug_flags & DEBUG_FLAG_BG_ALGO)
+					if (ba_debug_flags & DEBUG_FLAG_BG_ALGO)
 						info("Algo(%d) added node "
 						     "%c%c%c %d %d -> "
 						     "%c%c%c %d %d",
@@ -4541,12 +4545,12 @@ static int _find_x_path(List results, ba_node_t *ba_node,
 		}
 	}
 
-	if(algo == BLOCK_ALGO_FIRST) {
-		if(ba_debug_flags & DEBUG_FLAG_BG_ALGO)
+	if (algo == BLOCK_ALGO_FIRST) {
+		if (ba_debug_flags & DEBUG_FLAG_BG_ALGO)
 			info("Algo(%d) couldn't find path", algo);
 		return 0;
-	} else if(algo == BLOCK_ALGO_SECOND) {
-		if(ba_debug_flags & DEBUG_FLAG_BG_ALGO)
+	} else if (algo == BLOCK_ALGO_SECOND) {
+		if (ba_debug_flags & DEBUG_FLAG_BG_ALGO)
 			info("Algo(%d) looking for the next free node "
 			     "starting at %c%c%c",
 			     algo,
@@ -4554,26 +4558,26 @@ static int _find_x_path(List results, ba_node_t *ba_node,
 			     alpha_num[ba_node->coord[Y]],
 			     alpha_num[ba_node->coord[Z]]);
 
-		if(best_path)
+		if (best_path)
 			list_flush(best_path);
 		else
 			best_path = list_create(_delete_path_list);
 
-		if(path)
+		if (path)
 			list_flush(path);
 		else
 			path = list_create(_delete_path_list);
 
 		_find_next_free_using_port_2(curr_switch, 0, results, X, 0);
 
-		if(best_count < BEST_COUNT_INIT) {
-			if(ba_debug_flags & DEBUG_FLAG_BG_ALGO)
+		if (best_count < BEST_COUNT_INIT) {
+			if (ba_debug_flags & DEBUG_FLAG_BG_ALGO)
 				info("Algo(%d) yes found next free %d", algo,
 				     best_count);
 			node_tar = _set_best_path();
 
-			if(deny_pass && (*deny_pass & PASS_DENY_X)
-			   && (*deny_pass & PASS_FOUND_X)) {
+			if (deny_pass && (*deny_pass & PASS_DENY_X)
+			    && (*deny_pass & PASS_FOUND_X)) {
 				debug("We don't allow X passthoughs.");
 				return 0;
 			}
@@ -4584,7 +4588,7 @@ static int _find_x_path(List results, ba_node_t *ba_node,
 
 			next_switch = &next_node->axis_switch[X];
 
-			if(ba_debug_flags & DEBUG_FLAG_BG_ALGO)
+			if (ba_debug_flags & DEBUG_FLAG_BG_ALGO)
 				info("Algo(%d) found %d looking at %c%c%c "
 				     "going to %c%c%c %d",
 				     algo, found,
@@ -4598,21 +4602,21 @@ static int _find_x_path(List results, ba_node_t *ba_node,
 
 			list_append(results, next_node);
 			found++;
-			if(_find_x_path(results, next_node,
-					start, x_size, found,
-					conn_type, algo)) {
+			if (_find_x_path(results, next_node,
+					 start, x_size, found,
+					 conn_type, algo)) {
 				return 1;
 			} else {
 				found--;
 				_reset_the_path(curr_switch, 0, 1, X);
 				_remove_node(results, next_node->coord);
-				if(ba_debug_flags & DEBUG_FLAG_BG_ALGO)
+				if (ba_debug_flags & DEBUG_FLAG_BG_ALGO)
 					info("Algo(%d) couldn't finish "
 					     "the path off this one", algo);
 			}
 		}
 
-		if(ba_debug_flags & DEBUG_FLAG_BG_ALGO)
+		if (ba_debug_flags & DEBUG_FLAG_BG_ALGO)
 			info("Algo(%d) couldn't find path", algo);
 		return 0;
 	}
@@ -4628,13 +4632,13 @@ static int _remove_node(List results, uint16_t *node_tar)
 	ba_node_t *ba_node = NULL;
 
 	itr = list_iterator_create(results);
-	while((ba_node = (ba_node_t*) list_next(itr))) {
+	while ((ba_node = (ba_node_t*) list_next(itr))) {
 
 #ifdef HAVE_BG_L_P
-		if(node_tar[X] == ba_node->coord[X]
-		   && node_tar[Y] == ba_node->coord[Y]
-		   && node_tar[Z] == ba_node->coord[Z]) {
-			if(ba_debug_flags & DEBUG_FLAG_BG_ALGO)
+		if (node_tar[X] == ba_node->coord[X]
+		    && node_tar[Y] == ba_node->coord[Y]
+		    && node_tar[Z] == ba_node->coord[Z]) {
+			if (ba_debug_flags & DEBUG_FLAG_BG_ALGO)
 				info("removing %c%c%c from list",
 				     alpha_num[node_tar[X]],
 				     alpha_num[node_tar[Y]],
@@ -4643,8 +4647,8 @@ static int _remove_node(List results, uint16_t *node_tar)
 			break;
 		}
 #else
-		if(node_tar[X] == ba_node->coord[X]) {
-			if(ba_debug_flags & DEBUG_FLAG_BG_ALGO)
+		if (node_tar[X] == ba_node->coord[X]) {
+			if (ba_debug_flags & DEBUG_FLAG_BG_ALGO)
 				info("removing %d from list",
 				     node_tar[X]);
 			list_remove (itr);
@@ -4687,30 +4691,30 @@ static int _find_next_free_using_port_2(ba_switch_t *curr_switch,
 	path_add->dim = dim;
 	path_add->in = source_port;
 
-	if(count>=best_count)
+	if (count>=best_count)
 		goto return_0;
 
 	itr = list_iterator_create(nodes);
-	while((ba_node = (ba_node_t*) list_next(itr))) {
-		if(node_tar[X] == ba_node->coord[X]
-		   && node_tar[Y] == ba_node->coord[Y]
-		   && node_tar[Z] == ba_node->coord[Z]) {
+	while ((ba_node = (ba_node_t*) list_next(itr))) {
+		if (node_tar[X] == ba_node->coord[X]
+		    && node_tar[Y] == ba_node->coord[Y]
+		    && node_tar[Z] == ba_node->coord[Z]) {
 			broke = 1;
 			break;
 		}
 	}
 	list_iterator_destroy(itr);
 
-	if(!broke && count>0 &&
-	   !ba_system_ptr->grid[node_tar[X]][node_tar[Y]][node_tar[Z]].used) {
-		if(ba_debug_flags & DEBUG_FLAG_BG_ALGO)
+	if (!broke && count>0 &&
+	    !ba_system_ptr->grid[node_tar[X]][node_tar[Y]][node_tar[Z]].used) {
+		if (ba_debug_flags & DEBUG_FLAG_BG_ALGO)
 			info("this one not found %c%c%c",
 			     alpha_num[node_tar[X]],
 			     alpha_num[node_tar[Y]],
 			     alpha_num[node_tar[Z]]);
 		broke = 0;
 
-		if((source_port%2))
+		if ((source_port%2))
 			target_port=1;
 
 		list_flush(best_path);
@@ -4720,7 +4724,7 @@ static int _find_next_free_using_port_2(ba_switch_t *curr_switch,
 		list_push(path, path_add);
 
 		itr = list_iterator_create(path);
-		while((path_switch = (ba_path_switch_t*) list_next(itr))){
+		while ((path_switch = (ba_path_switch_t*) list_next(itr))){
 
 			temp_switch = (ba_path_switch_t *)
 				xmalloc(sizeof(ba_path_switch_t));
@@ -4739,16 +4743,16 @@ static int _find_next_free_using_port_2(ba_switch_t *curr_switch,
 	}
 
 	used=0;
-	if(!curr_switch->int_wire[port_to_try].used) {
+	if (!curr_switch->int_wire[port_to_try].used) {
 		itr = list_iterator_create(path);
-		while((path_switch =
-		       (ba_path_switch_t*) list_next(itr))){
-
-			if(((path_switch->geometry[X] == node_src[X])
-			    && (path_switch->geometry[Y] == node_src[Y])
-			    && (path_switch->geometry[Z] == node_tar[Z]))) {
-				if( path_switch->out
-				    == port_to_try) {
+		while ((path_switch =
+			(ba_path_switch_t*) list_next(itr))){
+
+			if (((path_switch->geometry[X] == node_src[X])
+			     && (path_switch->geometry[Y] == node_src[Y])
+			     && (path_switch->geometry[Z] == node_tar[Z]))) {
+				if ( path_switch->out
+				     == port_to_try) {
 					used = 1;
 					break;
 				}
@@ -4757,17 +4761,17 @@ static int _find_next_free_using_port_2(ba_switch_t *curr_switch,
 		list_iterator_destroy(itr);
 
 		/* check to see if wire 0 is used with this port */
-		if(curr_switch->
-		   ext_wire[port_to_try].node_tar[X]
-		   == curr_switch->ext_wire[0].node_tar[X]
-		   && curr_switch->ext_wire[port_to_try].node_tar[Y]
-		   == curr_switch->ext_wire[0].node_tar[Y]
-		   && curr_switch->ext_wire[port_to_try].node_tar[Z]
-		   == curr_switch->ext_wire[0].node_tar[Z]) {
+		if (curr_switch->
+		    ext_wire[port_to_try].node_tar[X]
+		    == curr_switch->ext_wire[0].node_tar[X]
+		    && curr_switch->ext_wire[port_to_try].node_tar[Y]
+		    == curr_switch->ext_wire[0].node_tar[Y]
+		    && curr_switch->ext_wire[port_to_try].node_tar[Z]
+		    == curr_switch->ext_wire[0].node_tar[Z]) {
 			used = 1;
 		}
 
-		if(!used) {
+		if (!used) {
 			port_tar = curr_switch->
 				ext_wire[port_to_try].port_tar;
 			node_tar = curr_switch->
@@ -4783,9 +4787,9 @@ static int _find_next_free_using_port_2(ba_switch_t *curr_switch,
 			_find_next_free_using_port_2(next_switch,
 						     port_tar, nodes,
 						     dim, count);
-			while((temp_switch = list_pop(path)) != path_add){
+			while ((temp_switch = list_pop(path)) != path_add){
 				xfree(temp_switch);
-				if(ba_debug_flags & DEBUG_FLAG_BG_ALGO_DEEP)
+				if (ba_debug_flags & DEBUG_FLAG_BG_ALGO_DEEP)
 					info("something here 1");
 			}
 		}
@@ -4837,17 +4841,17 @@ static int _finish_torus(List results,
 	path_add->dim = dim;
 	path_add->in = source_port;
 
-	if(count>=best_count) {
+	if (count>=best_count) {
 		xfree(path_add);
 		return 0;
 	}
-	if(node_tar[X] == start[X]
-	   && node_tar[Y] == start[Y]
-	   && node_tar[Z] == start[Z]) {
+	if (node_tar[X] == start[X]
+	    && node_tar[Y] == start[Y]
+	    && node_tar[Z] == start[Z]) {
 
-		if((source_port%2))
+		if ((source_port%2))
 			target_port=1;
-		if(!curr_switch->int_wire[target_port].used) {
+		if (!curr_switch->int_wire[target_port].used) {
 
 			list_flush(best_path);
 
@@ -4856,7 +4860,7 @@ static int _finish_torus(List results,
 			list_push(path, path_add);
 
 			itr = list_iterator_create(path);
-			while((path_switch = list_next(itr))) {
+			while ((path_switch = list_next(itr))) {
 				temp_switch = xmalloc(sizeof(ba_path_switch_t));
 
 				temp_switch->geometry[X] =
@@ -4877,23 +4881,24 @@ static int _finish_torus(List results,
 		}
 	}
 
-	if(source_port==0 || source_port==3 || source_port==5) {
+	if (source_port==0 || source_port==3 || source_port==5) {
 		ports_to_try[0] = 4;
 		ports_to_try[1] = 2;
 	}
 
 	for(i=0;i<2;i++) {
 		used=0;
-		if(!curr_switch->int_wire[ports_to_try[i]].used) {
+		if (!curr_switch->int_wire[ports_to_try[i]].used) {
 			itr = list_iterator_create(path);
-			while((path_switch = list_next(itr))){
-
-				if(((path_switch->geometry[X] == node_src[X])
-				    && (path_switch->geometry[Y] == node_src[Y])
-				    && (path_switch->geometry[Z]
-					== node_tar[Z]))) {
-					if( path_switch->out
-					    == ports_to_try[i]) {
+			while ((path_switch = list_next(itr))){
+
+				if (((path_switch->geometry[X] == node_src[X])
+				     && (path_switch->geometry[Y]
+					 == node_src[Y])
+				     && (path_switch->geometry[Z]
+					 == node_tar[Z]))) {
+					if ( path_switch->out
+					     == ports_to_try[i]) {
 						used = 1;
 						break;
 					}
@@ -4902,20 +4907,20 @@ static int _finish_torus(List results,
 			list_iterator_destroy(itr);
 
 			/* check to see if wire 0 is used with this port */
-			if((curr_switch->
-			    ext_wire[ports_to_try[i]].node_tar[X] ==
-			    curr_switch->ext_wire[0].node_tar[X] &&
-			    curr_switch->
-			    ext_wire[ports_to_try[i]].node_tar[Y] ==
-			    curr_switch->ext_wire[0].node_tar[Y] &&
-			    curr_switch->
-			    ext_wire[ports_to_try[i]].node_tar[Z] ==
-			    curr_switch->ext_wire[0].node_tar[Z])) {
+			if ((curr_switch->
+			     ext_wire[ports_to_try[i]].node_tar[X] ==
+			     curr_switch->ext_wire[0].node_tar[X] &&
+			     curr_switch->
+			     ext_wire[ports_to_try[i]].node_tar[Y] ==
+			     curr_switch->ext_wire[0].node_tar[Y] &&
+			     curr_switch->
+			     ext_wire[ports_to_try[i]].node_tar[Z] ==
+			     curr_switch->ext_wire[0].node_tar[Z])) {
 				continue;
 			}
 
 
-			if(!used) {
+			if (!used) {
 				ba_node_t *next_node = NULL;
 				port_tar = curr_switch->
 					ext_wire[ports_to_try[i]].port_tar;
@@ -4929,9 +4934,9 @@ static int _finish_torus(List results,
 				   under lying infrastructure will
 				   allow it. */
 				itr = list_iterator_create(results);
-				while((next_node = list_next(itr))) {
-					if(ba_debug_flags
-					   & DEBUG_FLAG_BG_ALGO_DEEP)
+				while ((next_node = list_next(itr))) {
+					if (ba_debug_flags
+					    & DEBUG_FLAG_BG_ALGO_DEEP)
 						info("finishing_torus: "
 						     "looking at %c%c%c "
 						     "and %c%c%c",
@@ -4944,17 +4949,17 @@ static int _finish_torus(List results,
 						     alpha_num[node_tar[X]],
 						     alpha_num[node_tar[Y]],
 						     alpha_num[node_tar[Z]]);
-					if((node_tar[X] == next_node->coord[X])
-					   && (node_tar[Y]
-					       == next_node->coord[Y])
-					   && (node_tar[Z]
-					       == next_node->coord[Z])) {
+					if ((node_tar[X] == next_node->coord[X])
+					    && (node_tar[Y]
+						== next_node->coord[Y])
+					    && (node_tar[Z]
+						== next_node->coord[Z])) {
 						break;
 					}
 				}
 				list_iterator_destroy(itr);
-				if(next_node) {
-					if(ba_debug_flags & DEBUG_FLAG_BG_ALGO)
+				if (next_node) {
+					if (ba_debug_flags & DEBUG_FLAG_BG_ALGO)
 						info("finishing_torus: "
 						     "Can't finish torus with "
 						     "%c%c%c we already were "
@@ -4978,11 +4983,11 @@ static int _finish_torus(List results,
 				list_push(path, path_add);
 				_finish_torus(results, next_switch, port_tar,
 					      dim, count, start);
-				while((temp_switch = list_pop(path))
-				      != path_add){
+				while ((temp_switch = list_pop(path))
+				       != path_add){
 					xfree(temp_switch);
-					if(ba_debug_flags
-					   & DEBUG_FLAG_BG_ALGO_DEEP)
+					if (ba_debug_flags
+					    & DEBUG_FLAG_BG_ALGO_DEEP)
 						info("something here 3");
 				}
 			}
@@ -5005,22 +5010,22 @@ static uint16_t *_set_best_path()
 	ba_switch_t *curr_switch = NULL;
 	uint16_t *geo = NULL;
 
-	if(!best_path)
+	if (!best_path)
 		return NULL;
 
 	itr = list_iterator_create(best_path);
-	while((path_switch = (ba_path_switch_t*) list_next(itr))) {
-		if(deny_pass && path_switch->in > 1 && path_switch->out > 1) {
+	while ((path_switch = (ba_path_switch_t*) list_next(itr))) {
+		if (deny_pass && path_switch->in > 1 && path_switch->out > 1) {
 			*deny_pass |= PASS_FOUND_X;
 			debug2("got a passthrough in X");
 		}
-		if(ba_debug_flags & DEBUG_FLAG_BG_ALGO_DEEP)
+		if (ba_debug_flags & DEBUG_FLAG_BG_ALGO_DEEP)
 			info("mapping %c%c%c %d->%d",
 			     alpha_num[path_switch->geometry[X]],
 			     alpha_num[path_switch->geometry[Y]],
 			     alpha_num[path_switch->geometry[Z]],
 			     path_switch->in, path_switch->out);
-		if(!geo)
+		if (!geo)
 			geo = path_switch->geometry;
 		curr_switch = &ba_system_ptr->grid
 			[path_switch->geometry[X]]
@@ -5047,12 +5052,12 @@ static int _set_one_dim(uint16_t *start, uint16_t *end, uint16_t *coord)
 	ba_switch_t *curr_switch = NULL;
 
 	for(dim=0;dim<cluster_dims;dim++) {
-		if(start[dim]==end[dim]) {
+		if (start[dim]==end[dim]) {
 			curr_switch = &ba_system_ptr->grid
 				[coord[X]][coord[Y]][coord[Z]].axis_switch[dim];
 
-			if(!curr_switch->int_wire[0].used
-			   && !curr_switch->int_wire[1].used) {
+			if (!curr_switch->int_wire[0].used
+			    && !curr_switch->int_wire[1].used) {
 				curr_switch->int_wire[0].used = 1;
 				curr_switch->int_wire[0].port_tar = 1;
 				curr_switch->int_wire[1].used = 1;
diff --git a/src/plugins/select/bluegene/block_allocator/bridge_linker.c b/src/plugins/select/bluegene/block_allocator/bridge_linker.c
index 185ae72663e4a66b5f075968e95bf86436c767f5..5d7a4f942501fef85dd061b9bc44779dedcffcc8 100644
--- a/src/plugins/select/bluegene/block_allocator/bridge_linker.c
+++ b/src/plugins/select/bluegene/block_allocator/bridge_linker.c
@@ -226,13 +226,13 @@ extern int bridge_init()
 	int n_syms;
 	int rc;
 
-	if(initialized)
+	if (initialized)
 		return 1;
 
 	n_syms = sizeof( syms ) / sizeof( char * );
 
 	initialized = true;
-	if(!_get_syms(n_syms, syms, (void **) &bridge_api))
+	if (!_get_syms(n_syms, syms, (void **) &bridge_api))
 		return 0;
 #ifdef BG_SERIAL
 	debug("setting the serial to %s", BG_SERIAL);
@@ -249,7 +249,7 @@ extern int bridge_init()
 
 extern int bridge_fini()
 {
-	if(handle)
+	if (handle)
 		dlclose(handle);
 	initialized = false;
 
@@ -259,7 +259,7 @@ extern int bridge_fini()
 extern status_t bridge_get_bg(my_bluegene_t **bg)
 {
 	int rc = CONNECTION_ERROR;
-	if(!bridge_init())
+	if (!bridge_init())
 		return rc;
 
 	slurm_mutex_lock(&api_file_mutex);
@@ -271,7 +271,7 @@ extern status_t bridge_get_bg(my_bluegene_t **bg)
 extern status_t bridge_add_block(rm_partition_t *partition)
 {
 	int rc = CONNECTION_ERROR;
-	if(!bridge_init())
+	if (!bridge_init())
 		return rc;
 
 	slurm_mutex_lock(&api_file_mutex);
@@ -285,7 +285,7 @@ extern status_t bridge_get_block(pm_partition_id_t pid,
 				 rm_partition_t **partition)
 {
 	int rc = CONNECTION_ERROR;
-	if(!bridge_init())
+	if (!bridge_init())
 		return rc;
 
 	slurm_mutex_lock(&api_file_mutex);
@@ -299,7 +299,7 @@ extern status_t bridge_get_block_info(pm_partition_id_t pid,
 				      rm_partition_t **partition)
 {
 	int rc = CONNECTION_ERROR;
-	if(!bridge_init())
+	if (!bridge_init())
 		return rc;
 
 	/* this is here to make sure we don't lock up things with
@@ -307,7 +307,7 @@ extern status_t bridge_get_block_info(pm_partition_id_t pid,
 	rc = pthread_mutex_trylock(&api_file_mutex);
 	if (rc == EBUSY)
 		return rc;
-	else if(rc) {
+	else if (rc) {
 		errno = rc;
 		error("%s:%d %s: pthread_mutex_trylock(): %m",
 		      __FILE__, __LINE__, __CURRENT_FUNC__);
@@ -324,7 +324,7 @@ extern status_t bridge_modify_block(pm_partition_id_t pid,
 				    enum rm_modify_op op, const void *data)
 {
 	int rc = CONNECTION_ERROR;
-	if(!bridge_init())
+	if (!bridge_init())
 		return rc;
 
 	slurm_mutex_lock(&api_file_mutex);
@@ -337,7 +337,7 @@ extern status_t bridge_modify_block(pm_partition_id_t pid,
 extern status_t bridge_set_block_owner(pm_partition_id_t pid, const char *name)
 {
 	int rc = CONNECTION_ERROR;
-	if(!bridge_init())
+	if (!bridge_init())
 		return rc;
 
 	slurm_mutex_lock(&api_file_mutex);
@@ -350,7 +350,7 @@ extern status_t bridge_set_block_owner(pm_partition_id_t pid, const char *name)
 extern status_t bridge_add_block_user(pm_partition_id_t pid, const char *name)
 {
 	int rc = CONNECTION_ERROR;
-	if(!bridge_init())
+	if (!bridge_init())
 		return rc;
 
 	slurm_mutex_lock(&api_file_mutex);
@@ -364,7 +364,7 @@ extern status_t bridge_remove_block_user(pm_partition_id_t pid,
 					 const char *name)
 {
 	int rc = CONNECTION_ERROR;
-	if(!bridge_init())
+	if (!bridge_init())
 		return rc;
 
 	slurm_mutex_lock(&api_file_mutex);
@@ -377,7 +377,7 @@ extern status_t bridge_remove_block_user(pm_partition_id_t pid,
 extern status_t bridge_remove_block(pm_partition_id_t pid)
 {
 	int rc = CONNECTION_ERROR;
-	if(!bridge_init())
+	if (!bridge_init())
 		return rc;
 
 	slurm_mutex_lock(&api_file_mutex);
@@ -391,7 +391,7 @@ extern status_t bridge_get_blocks(rm_partition_state_flag_t flag,
 				  rm_partition_list_t **part_list)
 {
 	int rc = CONNECTION_ERROR;
-	if(!bridge_init())
+	if (!bridge_init())
 		return rc;
 
 	slurm_mutex_lock(&api_file_mutex);
@@ -405,7 +405,7 @@ extern status_t bridge_get_blocks_info(rm_partition_state_flag_t flag,
 				       rm_partition_list_t **part_list)
 {
 	int rc = CONNECTION_ERROR;
-	if(!bridge_init())
+	if (!bridge_init())
 		return rc;
 
 	slurm_mutex_lock(&api_file_mutex);
@@ -418,7 +418,7 @@ extern status_t bridge_get_blocks_info(rm_partition_state_flag_t flag,
 extern status_t bridge_get_job(db_job_id_t dbJobId, rm_job_t **job)
 {
 	int rc = CONNECTION_ERROR;
-	if(!bridge_init())
+	if (!bridge_init())
 		return rc;
 
 	slurm_mutex_lock(&api_file_mutex);
@@ -431,7 +431,7 @@ extern status_t bridge_get_job(db_job_id_t dbJobId, rm_job_t **job)
 extern status_t bridge_get_jobs(rm_job_state_flag_t flag, rm_job_list_t **jobs)
 {
 	int rc = CONNECTION_ERROR;
-	if(!bridge_init())
+	if (!bridge_init())
 		return rc;
 
 	slurm_mutex_lock(&api_file_mutex);
@@ -444,7 +444,7 @@ extern status_t bridge_get_jobs(rm_job_state_flag_t flag, rm_job_list_t **jobs)
 extern status_t bridge_remove_job(db_job_id_t jid)
 {
 	int rc = CONNECTION_ERROR;
-	if(!bridge_init())
+	if (!bridge_init())
 		return rc;
 
 	slurm_mutex_lock(&api_file_mutex);
@@ -458,7 +458,7 @@ extern status_t bridge_get_nodecards(rm_bp_id_t bpid,
 				     rm_nodecard_list_t **nc_list)
 {
 	int rc = CONNECTION_ERROR;
-	if(!bridge_init())
+	if (!bridge_init())
 		return rc;
 
 	slurm_mutex_lock(&api_file_mutex);
@@ -471,7 +471,7 @@ extern status_t bridge_get_nodecards(rm_bp_id_t bpid,
 extern status_t bridge_new_nodecard(rm_nodecard_t **nodecard)
 {
 	int rc = CONNECTION_ERROR;
-	if(!bridge_init())
+	if (!bridge_init())
 		return rc;
 
 	slurm_mutex_lock(&api_file_mutex);
@@ -484,7 +484,7 @@ extern status_t bridge_new_nodecard(rm_nodecard_t **nodecard)
 extern status_t bridge_free_nodecard(rm_nodecard_t *nodecard)
 {
 	int rc = CONNECTION_ERROR;
-	if(!bridge_init())
+	if (!bridge_init())
 		return rc;
 
 	slurm_mutex_lock(&api_file_mutex);
@@ -498,7 +498,7 @@ extern status_t bridge_free_nodecard(rm_nodecard_t *nodecard)
 extern status_t bridge_new_ionode(rm_ionode_t **ionode)
 {
 	int rc = CONNECTION_ERROR;
-	if(!bridge_init())
+	if (!bridge_init())
 		return rc;
 
 	slurm_mutex_lock(&api_file_mutex);
@@ -511,7 +511,7 @@ extern status_t bridge_new_ionode(rm_ionode_t **ionode)
 extern status_t bridge_free_ionode(rm_ionode_t *ionode)
 {
 	int rc = CONNECTION_ERROR;
-	if(!bridge_init())
+	if (!bridge_init())
 		return rc;
 
 	slurm_mutex_lock(&api_file_mutex);
@@ -525,7 +525,7 @@ extern status_t bridge_free_ionode(rm_ionode_t *ionode)
 extern status_t bridge_new_block(rm_partition_t **partition)
 {
 	int rc = CONNECTION_ERROR;
-	if(!bridge_init())
+	if (!bridge_init())
 		return rc;
 
 	slurm_mutex_lock(&api_file_mutex);
@@ -538,7 +538,7 @@ extern status_t bridge_new_block(rm_partition_t **partition)
 extern status_t bridge_free_block(rm_partition_t *partition)
 {
 	int rc = CONNECTION_ERROR;
-	if(!bridge_init())
+	if (!bridge_init())
 		return rc;
 
 	slurm_mutex_lock(&api_file_mutex);
@@ -551,7 +551,7 @@ extern status_t bridge_free_block(rm_partition_t *partition)
 extern status_t bridge_free_job(rm_job_t *job)
 {
 	int rc = CONNECTION_ERROR;
-	if(!bridge_init())
+	if (!bridge_init())
 		return rc;
 
 	slurm_mutex_lock(&api_file_mutex);
@@ -564,7 +564,7 @@ extern status_t bridge_free_job(rm_job_t *job)
 extern status_t bridge_free_bg(my_bluegene_t *bg)
 {
 	int rc = CONNECTION_ERROR;
-	if(!bridge_init())
+	if (!bridge_init())
 		return rc;
 
 	slurm_mutex_lock(&api_file_mutex);
@@ -577,7 +577,7 @@ extern status_t bridge_free_bg(my_bluegene_t *bg)
 extern status_t bridge_free_block_list(rm_partition_list_t *part_list)
 {
 	int rc = CONNECTION_ERROR;
-	if(!bridge_init())
+	if (!bridge_init())
 		return rc;
 
 	slurm_mutex_lock(&api_file_mutex);
@@ -590,7 +590,7 @@ extern status_t bridge_free_block_list(rm_partition_list_t *part_list)
 extern status_t bridge_free_job_list(rm_job_list_t *job_list)
 {
 	int rc = CONNECTION_ERROR;
-	if(!bridge_init())
+	if (!bridge_init())
 		return rc;
 
 	slurm_mutex_lock(&api_file_mutex);
@@ -603,7 +603,7 @@ extern status_t bridge_free_job_list(rm_job_list_t *job_list)
 extern status_t bridge_free_nodecard_list(rm_nodecard_list_t *nc_list)
 {
 	int rc = CONNECTION_ERROR;
-	if(!bridge_init())
+	if (!bridge_init())
 		return rc;
 
 	slurm_mutex_lock(&api_file_mutex);
@@ -617,7 +617,7 @@ extern status_t bridge_get_data(rm_element_t* element,
 				enum rm_specification field, void *data)
 {
 	int rc = CONNECTION_ERROR;
-	if(!bridge_init())
+	if (!bridge_init())
 		return rc;
 
 	slurm_mutex_lock(&api_file_mutex);
@@ -631,7 +631,7 @@ extern status_t bridge_set_data(rm_element_t* element,
 				enum rm_specification field, void *data)
 {
 	int rc = CONNECTION_ERROR;
-	if(!bridge_init())
+	if (!bridge_init())
 		return rc;
 
 	slurm_mutex_lock(&api_file_mutex);
@@ -645,7 +645,7 @@ extern status_t bridge_set_data(rm_element_t* element,
 extern status_t bridge_signal_job(db_job_id_t jid, rm_signal_t sig)
 {
 	int rc = CONNECTION_ERROR;
-	if(!bridge_init())
+	if (!bridge_init())
 		return rc;
 
 	slurm_mutex_lock(&api_file_mutex);
@@ -658,7 +658,7 @@ extern status_t bridge_signal_job(db_job_id_t jid, rm_signal_t sig)
 extern status_t bridge_cancel_job(db_job_id_t jid)
 {
 	int rc = CONNECTION_ERROR;
-	if(!bridge_init())
+	if (!bridge_init())
 		return rc;
 
 	slurm_mutex_lock(&api_file_mutex);
@@ -672,7 +672,7 @@ extern status_t bridge_cancel_job(db_job_id_t jid)
 extern status_t bridge_create_block(pm_partition_id_t pid)
 {
 	int rc = CONNECTION_ERROR;
-	if(!bridge_init())
+	if (!bridge_init())
 		return rc;
 
 	slurm_mutex_lock(&api_file_mutex);
@@ -686,7 +686,7 @@ extern status_t bridge_create_block(pm_partition_id_t pid)
 extern status_t bridge_reboot_block(pm_partition_id_t pid)
 {
 	int rc = CONNECTION_ERROR;
-	if(!bridge_init())
+	if (!bridge_init())
 		return rc;
 
 	slurm_mutex_lock(&api_file_mutex);
@@ -700,7 +700,7 @@ extern status_t bridge_reboot_block(pm_partition_id_t pid)
 extern status_t bridge_destroy_block(pm_partition_id_t pid)
 {
 	int rc = CONNECTION_ERROR;
-	if(!bridge_init())
+	if (!bridge_init())
 		return rc;
 
 	slurm_mutex_lock(&api_file_mutex);
@@ -716,11 +716,11 @@ extern int bridge_set_log_params(char *api_file_name, unsigned int level)
         FILE *fp2 = NULL;
 	int rc = SLURM_SUCCESS;
 
-	if(!bridge_init())
+	if (!bridge_init())
 		return SLURM_ERROR;
 
 	slurm_mutex_lock(&api_file_mutex);
-	if(fp)
+	if (fp)
 		fp2 = fp;
 
 	fp = fopen(api_file_name, "a");
@@ -739,7 +739,7 @@ extern int bridge_set_log_params(char *api_file_name, unsigned int level)
 	   log */
 	//(void)dup2(fileno(fp), STDERR_FILENO);
 
-	if(fp2)
+	if (fp2)
 		fclose(fp2);
 end_it:
 	slurm_mutex_unlock(&api_file_mutex);
diff --git a/src/plugins/select/bluegene/block_allocator/wire_test.c b/src/plugins/select/bluegene/block_allocator/wire_test.c
index dfe1d3bd63f7f501c1ae686a997cd5e29cea1d08..a444a11ece6de790ef4da0ed23f99c3ea2d7542f 100644
--- a/src/plugins/select/bluegene/block_allocator/wire_test.c
+++ b/src/plugins/select/bluegene/block_allocator/wire_test.c
@@ -87,7 +87,7 @@ int main(int argc, char** argv)
 /* 	request->conn_type = SELECT_TORUS; */
 /* 	new_ba_request(request); */
 /* 	print_ba_request(request); */
-/* 	if(!allocate_block(request, results)) { */
+/* 	if (!allocate_block(request, results)) { */
 /*        		debug("couldn't allocate %c%c%c", */
 /* 		       alpha_num[request->geometry[0]], */
 /* 		       alpha_num[request->geometry[1]], */
@@ -110,7 +110,7 @@ int main(int argc, char** argv)
 /* 	request->conn_type = SELECT_TORUS; */
 /* 	new_ba_request(request); */
 /* 	print_ba_request(request); */
-/* 	if(!allocate_block(request, results)) { */
+/* 	if (!allocate_block(request, results)) { */
 /*        		debug("couldn't allocate %c%c%c", */
 /* 		       request->geometry[0], */
 /* 		       request->geometry[1], */
@@ -133,7 +133,7 @@ int main(int argc, char** argv)
 	request->conn_type = SELECT_TORUS;
 	new_ba_request(request);
 	print_ba_request(request);
-	if(!allocate_block(request, results)) {
+	if (!allocate_block(request, results)) {
        		debug("couldn't allocate %c%c%c",
 		       request->geometry[0],
 		       request->geometry[1],
diff --git a/src/plugins/select/bluegene/plugin/bg_block_info.c b/src/plugins/select/bluegene/plugin/bg_block_info.c
index f2257c6b1f658e2aceff30db7a8c4a12ea47996a..7f7493c1bba36c7e482eceff3dbfa543969de657 100644
--- a/src/plugins/select/bluegene/plugin/bg_block_info.c
+++ b/src/plugins/select/bluegene/plugin/bg_block_info.c
@@ -87,21 +87,21 @@ static int _block_is_deallocating(bg_record_t *bg_record)
 	int jobid = bg_record->job_running;
 	char *user_name = NULL;
 
-	if(bg_record->modifying)
+	if (bg_record->modifying)
 		return SLURM_SUCCESS;
 
 	user_name = xstrdup(bg_conf->slurm_user_name);
-	if(remove_all_users(bg_record->bg_block_id, NULL)
-	   == REMOVE_USER_ERR) {
+	if (remove_all_users(bg_record->bg_block_id, NULL)
+	    == REMOVE_USER_ERR) {
 		error("Something happened removing "
 		      "users from block %s",
 		      bg_record->bg_block_id);
 	}
 
-	if(bg_record->target_name && bg_record->user_name) {
-		if(!strcmp(bg_record->target_name, user_name)) {
-			if(strcmp(bg_record->target_name, bg_record->user_name)
-			   || (jobid > NO_JOB_RUNNING)) {
+	if (bg_record->target_name && bg_record->user_name) {
+		if (!strcmp(bg_record->target_name, user_name)) {
+			if (strcmp(bg_record->target_name, bg_record->user_name)
+			    || (jobid > NO_JOB_RUNNING)) {
 				kill_job_struct_t *freeit =
 					xmalloc(sizeof(freeit));
 				freeit->jobid = jobid;
@@ -123,7 +123,7 @@ static int _block_is_deallocating(bg_record_t *bg_record)
 			      "for block %s.",
 			      bg_record->bg_block_id);
 		}
-	} else if(bg_record->user_name) {
+	} else if (bg_record->user_name) {
 		error("Target Name was not set "
 		      "not set for block %s.",
 		      bg_record->bg_block_id);
@@ -136,8 +136,8 @@ static int _block_is_deallocating(bg_record_t *bg_record)
 		bg_record->target_name = xstrdup(bg_record->user_name);
 	}
 
-	if(remove_from_bg_list(bg_lists->job_running, bg_record)
-	   == SLURM_SUCCESS)
+	if (remove_from_bg_list(bg_lists->job_running, bg_record)
+	    == SLURM_SUCCESS)
 		num_unused_cpus += bg_record->cpu_cnt;
 	remove_from_bg_list(bg_lists->booted, bg_record);
 
@@ -149,7 +149,7 @@ static void _destroy_kill_struct(void *object)
 {
 	kill_job_struct_t *freeit = (kill_job_struct_t *)object;
 
-	if(freeit) {
+	if (freeit) {
 		xfree(freeit);
 	}
 }
@@ -178,8 +178,8 @@ extern int block_ready(struct job_record *job_ptr)
 		slurm_mutex_lock(&block_state_mutex);
 		bg_record = find_bg_record_in_list(bg_lists->main, block_id);
 
-		if(bg_record) {
-			if(bg_record->job_running != job_ptr->job_id) {
+		if (bg_record) {
+			if (bg_record->job_running != job_ptr->job_id) {
 				rc = 0;
 			} else if ((bg_record->user_uid == job_ptr->user_id)
 				   && (bg_record->state
@@ -217,7 +217,7 @@ extern int block_ready(struct job_record *job_ptr)
 extern void pack_block(bg_record_t *bg_record, Buf buffer,
 		       uint16_t protocol_version)
 {
-	if(protocol_version >= SLURM_2_2_PROTOCOL_VERSION) {
+	if (protocol_version >= SLURM_2_2_PROTOCOL_VERSION) {
 		packstr(bg_record->bg_block_id, buffer);
 #ifdef HAVE_BGL
 		packstr(bg_record->blrtsimage, buffer);
@@ -238,7 +238,7 @@ extern void pack_block(bg_record_t *bg_record, Buf buffer,
 		packstr(bg_record->ramdiskimage, buffer);
 		packstr(bg_record->reason, buffer);
 		pack16((uint16_t)bg_record->state, buffer);
-	} else if(protocol_version >= SLURM_2_1_PROTOCOL_VERSION) {
+	} else if (protocol_version >= SLURM_2_1_PROTOCOL_VERSION) {
 		packstr(bg_record->bg_block_id, buffer);
 #ifdef HAVE_BGL
 		packstr(bg_record->blrtsimage, buffer);
@@ -276,10 +276,10 @@ extern int update_block_list()
 	kill_job_struct_t *freeit = NULL;
 	ListIterator itr = NULL;
 
-	if(!kill_job_list)
+	if (!kill_job_list)
 		kill_job_list = list_create(_destroy_kill_struct);
 
-	if(!bg_lists->main)
+	if (!bg_lists->main)
 		return updated;
 
 	slurm_mutex_lock(&block_state_mutex);
@@ -291,7 +291,7 @@ extern int update_block_list()
 		name = bg_record->bg_block_id;
 		if ((rc = bridge_get_block_info(name, &block_ptr))
 		    != STATUS_OK) {
-			if(bg_conf->layout_mode == LAYOUT_DYNAMIC) {
+			if (bg_conf->layout_mode == LAYOUT_DYNAMIC) {
 				switch(rc) {
 				case INCONSISTENT_DATA:
 					debug2("got inconsistent data when "
@@ -314,7 +314,7 @@ extern int update_block_list()
 			   iteration.  It usually means something like
 			   rm_get_BG was called which can be a very
 			   long call */
-			if(rc == EBUSY) {
+			if (rc == EBUSY) {
 				debug5("lock was busy, aborting");
 				break;
 			}
@@ -333,7 +333,7 @@ extern int update_block_list()
 			      bg_err_str(rc));
 			updated = -1;
 			goto next_block;
-		} else if(bg_record->node_use != node_use) {
+		} else if (bg_record->node_use != node_use) {
 			debug("node_use of Block %s was %d "
 			      "and now is %d",
 			      bg_record->bg_block_id,
@@ -343,8 +343,8 @@ extern int update_block_list()
 			updated = 1;
 		}
 #else
-		if((bg_record->node_cnt < bg_conf->bp_node_cnt)
-		   || (bg_conf->bp_node_cnt == bg_conf->nodecard_node_cnt)) {
+		if ((bg_record->node_cnt < bg_conf->bp_node_cnt)
+		    || (bg_conf->bp_node_cnt == bg_conf->nodecard_node_cnt)) {
 			char *mode = NULL;
 			uint16_t conn_type = SELECT_SMALL;
 			if ((rc = bridge_get_data(block_ptr,
@@ -355,7 +355,7 @@ extern int update_block_list()
 				      "%s", bg_err_str(rc));
 				updated = -1;
 				goto next_block;
-			} else if(mode) {
+			} else if (mode) {
 				switch(mode[0]) {
 				case 's':
 					conn_type = SELECT_HTC_S;
@@ -376,7 +376,7 @@ extern int update_block_list()
 				free(mode);
 			}
 
-			if(bg_record->conn_type != conn_type) {
+			if (bg_record->conn_type != conn_type) {
 				debug("mode of small Block %s was %u "
 				      "and now is %u",
 				      bg_record->bg_block_id,
@@ -394,9 +394,9 @@ extern int update_block_list()
 			      bg_err_str(rc));
 			updated = -1;
 			goto next_block;
-		} else if(bg_record->job_running != BLOCK_ERROR_STATE
-			  //plugin set error
-			  && bg_record->state != state) {
+		} else if (bg_record->job_running != BLOCK_ERROR_STATE
+			   //plugin set error
+			   && bg_record->state != state) {
 			int skipped_dealloc = 0;
 
 			debug("state of Block %s was %d and now is %d",
@@ -407,12 +407,12 @@ extern int update_block_list()
 			  check to make sure block went
 			  through freeing correctly
 			*/
-			if((bg_record->state != RM_PARTITION_DEALLOCATING
-			    && bg_record->state != RM_PARTITION_ERROR)
-			   && state == RM_PARTITION_FREE)
+			if ((bg_record->state != RM_PARTITION_DEALLOCATING
+			     && bg_record->state != RM_PARTITION_ERROR)
+			    && state == RM_PARTITION_FREE)
 				skipped_dealloc = 1;
-			else if((bg_record->state == RM_PARTITION_READY)
-				&& (state == RM_PARTITION_CONFIGURING)) {
+			else if ((bg_record->state == RM_PARTITION_READY)
+				 && (state == RM_PARTITION_CONFIGURING)) {
 				/* This means the user did a reboot through
 				   mpirun but we missed the state
 				   change */
@@ -424,9 +424,9 @@ extern int update_block_list()
 				xfree(bg_record->target_name);
 				bg_record->target_name =
 					xstrdup(bg_record->user_name);
-			} else if((bg_record->state
-				   == RM_PARTITION_DEALLOCATING)
-				  && (state == RM_PARTITION_CONFIGURING))
+			} else if ((bg_record->state
+				    == RM_PARTITION_DEALLOCATING)
+				   && (state == RM_PARTITION_CONFIGURING))
 				/* This is a funky state IBM says
 				   isn't a bug, but all their
 				   documentation says this doesn't
@@ -438,11 +438,11 @@ extern int update_block_list()
 
 			bg_record->state = state;
 
-			if(bg_record->state == RM_PARTITION_DEALLOCATING
-			   || skipped_dealloc)
+			if (bg_record->state == RM_PARTITION_DEALLOCATING
+			    || skipped_dealloc)
 				_block_is_deallocating(bg_record);
 #ifndef HAVE_BGL
-			else if(bg_record->state == RM_PARTITION_REBOOTING) {
+			else if (bg_record->state == RM_PARTITION_REBOOTING) {
 				/* This means the user did a reboot through
 				   mpirun */
 				debug("Block %s rebooting.  "
@@ -454,19 +454,19 @@ extern int update_block_list()
 					xstrdup(bg_record->user_name);
 			}
 #endif
-			else if(bg_record->state == RM_PARTITION_CONFIGURING) {
+			else if (bg_record->state == RM_PARTITION_CONFIGURING) {
 				debug("Setting bootflag for %s",
 				      bg_record->bg_block_id);
 				bg_record->boot_state = 1;
-			} else if(bg_record->state == RM_PARTITION_FREE) {
-				if(remove_from_bg_list(bg_lists->job_running,
-						       bg_record)
-				   == SLURM_SUCCESS)
+			} else if (bg_record->state == RM_PARTITION_FREE) {
+				if (remove_from_bg_list(bg_lists->job_running,
+							bg_record)
+				    == SLURM_SUCCESS)
 					num_unused_cpus += bg_record->cpu_cnt;
 				remove_from_bg_list(bg_lists->booted,
 						    bg_record);
-			} else if(bg_record->state == RM_PARTITION_ERROR) {
-				if(bg_record->boot_state == 1)
+			} else if (bg_record->state == RM_PARTITION_ERROR) {
+				if (bg_record->boot_state == 1)
 					error("Block %s in an error "
 					      "state while booting.",
 					      bg_record->bg_block_id);
@@ -476,9 +476,9 @@ extern int update_block_list()
 				remove_from_bg_list(bg_lists->booted,
 						    bg_record);
 				trigger_block_error();
-			} else if(bg_record->state == RM_PARTITION_READY) {
-				if(!block_ptr_exist_in_list(bg_lists->booted,
-							    bg_record))
+			} else if (bg_record->state == RM_PARTITION_READY) {
+				if (!block_ptr_exist_in_list(bg_lists->booted,
+							     bg_record))
 					list_push(bg_lists->booted, bg_record);
 			}
 
@@ -490,16 +490,16 @@ extern int update_block_list()
 		debug3("boot state for block %s is %d",
 		       bg_record->bg_block_id,
 		       bg_record->boot_state);
-		if(bg_record->boot_state == 1) {
+		if (bg_record->boot_state == 1) {
 			switch(bg_record->state) {
 			case RM_PARTITION_CONFIGURING:
 				debug3("checking to make sure user %s "
 				       "is the user.",
 				       bg_record->target_name);
 
-				if(update_block_user(bg_record, 0) == 1)
+				if (update_block_user(bg_record, 0) == 1)
 					last_bg_update = time(NULL);
-				if(bg_record->job_ptr) {
+				if (bg_record->job_ptr) {
 					bg_record->job_ptr->job_state |=
 						JOB_CONFIGURING;
 					last_job_update = time(NULL);
@@ -516,9 +516,9 @@ extern int update_block_list()
 				 */
 				break;
 			case RM_PARTITION_FREE:
-				if(bg_record->boot_count < RETRY_BOOT_COUNT) {
-					if((rc = boot_block(bg_record))
-					   != SLURM_SUCCESS)
+				if (bg_record->boot_count < RETRY_BOOT_COUNT) {
+					if ((rc = boot_block(bg_record))
+					    != SLURM_SUCCESS)
 						updated = -1;
 
 					if (bg_record->magic == BLOCK_MAGIC) {
@@ -543,10 +543,10 @@ extern int update_block_list()
 
 					bg_record->boot_state = 0;
 					bg_record->boot_count = 0;
-					if(remove_from_bg_list(
-						   bg_lists->job_running,
-						   bg_record)
-					   == SLURM_SUCCESS) {
+					if (remove_from_bg_list(
+						    bg_lists->job_running,
+						    bg_record)
+					    == SLURM_SUCCESS) {
 						num_unused_cpus +=
 							bg_record->cpu_cnt;
 					}
@@ -602,7 +602,7 @@ extern int update_block_list()
 	slurm_mutex_unlock(&block_state_mutex);
 
 	/* kill all the jobs from unexpectedly freed blocks */
-	while((freeit = list_pop(kill_job_list))) {
+	while ((freeit = list_pop(kill_job_list))) {
 		debug2("Trying to requeue job %u", freeit->jobid);
 		bg_requeue_job(freeit->jobid, 0);
 		_destroy_kill_struct(freeit);
@@ -626,13 +626,13 @@ extern int update_block_list_state(List block_list)
 
 	itr = list_iterator_create(block_list);
 	while ((bg_record = (bg_record_t *) list_next(itr)) != NULL) {
-		if(!bg_record->bg_block_id)
+		if (!bg_record->bg_block_id)
 			continue;
 
 		name = bg_record->bg_block_id;
 		if ((rc = bridge_get_block_info(name, &block_ptr))
 		    != STATUS_OK) {
-			if(bg_conf->layout_mode == LAYOUT_DYNAMIC) {
+			if (bg_conf->layout_mode == LAYOUT_DYNAMIC) {
 				switch(rc) {
 				case INCONSISTENT_DATA:
 					debug2("got inconsistent data when "
@@ -654,7 +654,7 @@ extern int update_block_list_state(List block_list)
 			   iteration.  It usually means something like
 			   rm_get_BG was called which can be a very
 			   long call */
-			if(rc == EBUSY) {
+			if (rc == EBUSY) {
 				debug5("lock was busy, aborting");
 				break;
 			}
@@ -672,7 +672,7 @@ extern int update_block_list_state(List block_list)
 			      bg_err_str(rc));
 			updated = -1;
 			goto next_block;
-		} else if(bg_record->state != state) {
+		} else if (bg_record->state != state) {
 			debug("freeing state of Block %s was %d and now is %d",
 			      bg_record->bg_block_id,
 			      bg_record->state,
diff --git a/src/plugins/select/bluegene/plugin/bg_job_place.c b/src/plugins/select/bluegene/plugin/bg_job_place.c
index 2d17e78e57a24976280c104a57f95a2e71192b5c..03062617757a507e8a081ce281a7869e5c615fa9 100644
--- a/src/plugins/select/bluegene/plugin/bg_job_place.c
+++ b/src/plugins/select/bluegene/plugin/bg_job_place.c
@@ -246,7 +246,7 @@ static int _check_images(struct job_record* job_ptr,
 		allow = _test_image_perms(*mloaderimage,
 					  bg_conf->mloader_list,
 					  job_ptr);
-		if(!allow) {
+		if (!allow) {
 			error("User %u:%u is not allowed "
 			      "to use MloaderImage %s",
 			      job_ptr->user_id, job_ptr->group_id,
@@ -261,7 +261,7 @@ static int _check_images(struct job_record* job_ptr,
 		allow = _test_image_perms(*ramdiskimage,
 					  bg_conf->ramdisk_list,
 					  job_ptr);
-		if(!allow) {
+		if (!allow) {
 			error("User %u:%u is not allowed "
 			      "to use RamDiskImage %s",
 			      job_ptr->user_id, job_ptr->group_id,
@@ -287,7 +287,7 @@ static bg_record_t *_find_matching_block(List block_list,
 	ListIterator itr = NULL;
 	char tmp_char[256];
 
-	if(bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
+	if (bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
 		info("number of blocks to check: %d state %d "
 		     "asking for %u-%u cpus",
 		     list_count(block_list),
@@ -302,32 +302,32 @@ static bg_record_t *_find_matching_block(List block_list,
 		/* The job running could be reset so set it back up
 		   here if there is a job_ptr
 		*/
-		if(bg_record->job_ptr)
+		if (bg_record->job_ptr)
 			bg_record->job_running = bg_record->job_ptr->job_id;
 
 		/*block is messed up some how (BLOCK_ERROR_STATE)
 		 * ignore it or if state == RM_PARTITION_ERROR */
-		if((bg_record->job_running == BLOCK_ERROR_STATE)
-		   || (bg_record->state == RM_PARTITION_ERROR)) {
-			if(bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
+		if ((bg_record->job_running == BLOCK_ERROR_STATE)
+		    || (bg_record->state == RM_PARTITION_ERROR)) {
+			if (bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
 				info("block %s is in an error "
 				     "state (can't use)",
 				     bg_record->bg_block_id);
 			continue;
-		} else if((bg_record->job_running != NO_JOB_RUNNING)
-			  && (bg_record->job_running != job_ptr->job_id)
-			  && ((bg_conf->layout_mode == LAYOUT_DYNAMIC)
-			      || ((!SELECT_IS_CHECK_FULL_SET(query_mode)
-				   || SELECT_IS_MODE_RUN_NOW(query_mode))
-				  && (bg_conf->layout_mode
-				      != LAYOUT_DYNAMIC)))) {
+		} else if ((bg_record->job_running != NO_JOB_RUNNING)
+			   && (bg_record->job_running != job_ptr->job_id)
+			   && ((bg_conf->layout_mode == LAYOUT_DYNAMIC)
+			       || ((!SELECT_IS_CHECK_FULL_SET(query_mode)
+				    || SELECT_IS_MODE_RUN_NOW(query_mode))
+				   && (bg_conf->layout_mode
+				       != LAYOUT_DYNAMIC)))) {
 			/* Look here if you are trying to run now or
 			   if you aren't looking at the full set.  We
 			   don't continue on running blocks for the
 			   full set because we are seeing if the job
 			   can ever run so look here.
 			*/
-			if(bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
+			if (bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
 				info("block %s in use by %s job %d",
 				     bg_record->bg_block_id,
 				     bg_record->user_name,
@@ -344,7 +344,7 @@ static bg_record_t *_find_matching_block(List block_list,
 			*/
 			convert_num_unit((float)bg_record->cpu_cnt, tmp_char,
 					 sizeof(tmp_char), UNIT_NONE);
-			if(bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
+			if (bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
 				info("block %s CPU count (%s) not suitable",
 				     bg_record->bg_block_id,
 				     tmp_char);
@@ -359,7 +359,7 @@ static bg_record_t *_find_matching_block(List block_list,
 		 * SLURM block not available to this job.
 		 */
 		if (!bit_super_set(bg_record->bitmap, slurm_block_bitmap)) {
-			if(bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
+			if (bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
 				info("bg block %s has nodes not "
 				     "usable by this job",
 				     bg_record->bg_block_id);
@@ -372,44 +372,44 @@ static bg_record_t *_find_matching_block(List block_list,
 		if (job_ptr->details->req_node_bitmap
 		    && (!bit_super_set(job_ptr->details->req_node_bitmap,
 				       bg_record->bitmap))) {
-			if(bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
+			if (bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
 				info("bg block %s lacks required nodes",
 				     bg_record->bg_block_id);
 			continue;
 		}
 
 
-		if(_check_for_booted_overlapping_blocks(
-			   block_list, itr, bg_record,
-			   overlap_check, overlapped_list, query_mode))
+		if (_check_for_booted_overlapping_blocks(
+			    block_list, itr, bg_record,
+			    overlap_check, overlapped_list, query_mode))
 			continue;
 
-		if(check_image) {
+		if (check_image) {
 #ifdef HAVE_BGL
-			if(request->blrtsimage &&
-			   strcasecmp(request->blrtsimage,
-				      bg_record->blrtsimage)) {
+			if (request->blrtsimage &&
+			    strcasecmp(request->blrtsimage,
+				       bg_record->blrtsimage)) {
 				*allow = 1;
 				continue;
 			}
 #endif
-			if(request->linuximage &&
-			   strcasecmp(request->linuximage,
-				      bg_record->linuximage)) {
+			if (request->linuximage &&
+			    strcasecmp(request->linuximage,
+				       bg_record->linuximage)) {
 				*allow = 1;
 				continue;
 			}
 
-			if(request->mloaderimage &&
-			   strcasecmp(request->mloaderimage,
-				      bg_record->mloaderimage)) {
+			if (request->mloaderimage &&
+			    strcasecmp(request->mloaderimage,
+				       bg_record->mloaderimage)) {
 				*allow = 1;
 				continue;
 			}
 
-			if(request->ramdiskimage &&
-			   strcasecmp(request->ramdiskimage,
-				      bg_record->ramdiskimage)) {
+			if (request->ramdiskimage &&
+			    strcasecmp(request->ramdiskimage,
+				       bg_record->ramdiskimage)) {
 				*allow = 1;
 				continue;
 			}
@@ -421,19 +421,19 @@ static bg_record_t *_find_matching_block(List block_list,
 		if ((request->conn_type != bg_record->conn_type)
 		    && (request->conn_type != SELECT_NAV)) {
 #ifndef HAVE_BGL
-			if(request->conn_type >= SELECT_SMALL) {
+			if (request->conn_type >= SELECT_SMALL) {
 				/* we only want to reboot blocks if
 				   they have to be so skip booted
 				   blocks if in small state
 				*/
-				if(check_image
-				   && (bg_record->state
-				       == RM_PARTITION_READY)) {
+				if (check_image
+				    && (bg_record->state
+					== RM_PARTITION_READY)) {
 					*allow = 1;
 					continue;
 				}
 				goto good_conn_type;
-			} else if(bg_record->conn_type >= SELECT_SMALL) {
+			} else if (bg_record->conn_type >= SELECT_SMALL) {
 				/* since we already checked to see if
 				   the cpus were good this means we are
 				   looking for a block in a range that
@@ -443,7 +443,7 @@ static bg_record_t *_find_matching_block(List block_list,
 				goto good_conn_type;
 			}
 #endif
-			if(bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
+			if (bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
 				info("bg block %s conn-type not usable "
 				     "asking for %s bg_record is %s",
 				     bg_record->bg_block_id,
@@ -481,7 +481,7 @@ static bg_record_t *_find_matching_block(List block_list,
 			if (!match)
 				continue;	/* Not usable */
 		}
-		if(bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
+		if (bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
 			info("we found one! %s", bg_record->bg_block_id);
 		break;
 	}
@@ -502,7 +502,7 @@ static int _check_for_booted_overlapping_blocks(
 	bool is_test = SELECT_IS_TEST(query_mode);
 
 	/* this test only is for actually picking a block not testing */
-	if(is_test && bg_conf->layout_mode == LAYOUT_DYNAMIC)
+	if (is_test && bg_conf->layout_mode == LAYOUT_DYNAMIC)
 		return rc;
 
 	/* Make sure no other blocks are under this block
@@ -523,7 +523,7 @@ static int _check_for_booted_overlapping_blocks(
 		overlap = blocks_overlap(bg_record, found_record);
 		slurm_mutex_unlock(&block_state_mutex);
 
-		if(overlap) {
+		if (overlap) {
 			overlap = 0;
 			/* make the available time on this block
 			 * (bg_record) the max of this found_record's job
@@ -532,31 +532,31 @@ static int _check_for_booted_overlapping_blocks(
 			 * don't have to remove them since the
 			 * block_list should always be destroyed afterwards.
 			 */
-			if(is_test && overlapped_list
-			   && found_record->job_ptr
-			   && bg_record->job_running == NO_JOB_RUNNING) {
+			if (is_test && overlapped_list
+			    && found_record->job_ptr
+			    && bg_record->job_running == NO_JOB_RUNNING) {
 				ListIterator itr = list_iterator_create(
 					overlapped_list);
 				bg_record_t *tmp_rec = NULL;
 
-				if(bg_conf->slurm_debug_flags
-				   & DEBUG_FLAG_BG_PICK)
+				if (bg_conf->slurm_debug_flags
+				    & DEBUG_FLAG_BG_PICK)
 					info("found overlapping block %s "
 					     "overlapped %s with job %u",
 					     found_record->bg_block_id,
 					     bg_record->bg_block_id,
 					     found_record->job_ptr->job_id);
 
-				while((tmp_rec = list_next(itr))) {
-					if(tmp_rec == bg_record)
+				while ((tmp_rec = list_next(itr))) {
+					if (tmp_rec == bg_record)
 						break;
 				}
 				list_iterator_destroy(itr);
-				if(tmp_rec && tmp_rec->job_ptr->end_time
-				   < found_record->job_ptr->end_time)
+				if (tmp_rec && tmp_rec->job_ptr->end_time
+				    < found_record->job_ptr->end_time)
 					tmp_rec->job_ptr =
 						found_record->job_ptr;
-				else if(!tmp_rec) {
+				else if (!tmp_rec) {
 					bg_record->job_ptr =
 						found_record->job_ptr;
 					list_append(overlapped_list,
@@ -567,39 +567,39 @@ static int _check_for_booted_overlapping_blocks(
 			 * right now so we will if there is another
 			 * overlapping block that ends later
 			 */
-			if(rc)
+			if (rc)
 				continue;
 			/* This test is here to check if the block we
 			 * chose is not booted or if there is a block
 			 * overlapping that we could avoid freeing if
 			 * we choose something else
 			 */
-			if(bg_conf->layout_mode == LAYOUT_OVERLAP
-			   && ((overlap_check == 0 && bg_record->state
-				!= RM_PARTITION_READY)
-			       || (overlap_check == 1 && found_record->state
-				   != RM_PARTITION_FREE))) {
+			if (bg_conf->layout_mode == LAYOUT_OVERLAP
+			    && ((overlap_check == 0 && bg_record->state
+				 != RM_PARTITION_READY)
+				|| (overlap_check == 1 && found_record->state
+				    != RM_PARTITION_FREE))) {
 
-				if(!is_test) {
+				if (!is_test) {
 					rc = 1;
 					break;
 				}
 			}
 
-			if((found_record->job_running != NO_JOB_RUNNING)
-			   || (found_record->state == RM_PARTITION_ERROR)) {
-				if((found_record->job_running
-				    == BLOCK_ERROR_STATE)
-				   || (found_record->state
-				       == RM_PARTITION_ERROR))
+			if ((found_record->job_running != NO_JOB_RUNNING)
+			    || (found_record->state == RM_PARTITION_ERROR)) {
+				if ((found_record->job_running
+				     == BLOCK_ERROR_STATE)
+				    || (found_record->state
+					== RM_PARTITION_ERROR))
 					error("can't use %s, "
 					      "overlapping block %s "
 					      "is in an error state.",
 					      bg_record->bg_block_id,
 					      found_record->bg_block_id);
 				else
-					if(bg_conf->slurm_debug_flags
-					   & DEBUG_FLAG_BG_PICK)
+					if (bg_conf->slurm_debug_flags
+					    & DEBUG_FLAG_BG_PICK)
 						info("can't use %s, there is "
 						     "a job (%d) running on "
 						     "an overlapping "
@@ -608,7 +608,7 @@ static int _check_for_booted_overlapping_blocks(
 						     found_record->job_running,
 						     found_record->bg_block_id);
 
-				if(bg_conf->layout_mode == LAYOUT_DYNAMIC) {
+				if (bg_conf->layout_mode == LAYOUT_DYNAMIC) {
 					List tmp_list = list_create(NULL);
 					/* this will remove and
 					 * destroy the memory for
@@ -617,9 +617,9 @@ static int _check_for_booted_overlapping_blocks(
 					list_remove(bg_record_itr);
 					slurm_mutex_lock(&block_state_mutex);
 
-					if(bg_record->original) {
-						if(bg_conf->slurm_debug_flags
-						   & DEBUG_FLAG_BG_PICK)
+					if (bg_record->original) {
+						if (bg_conf->slurm_debug_flags
+						    & DEBUG_FLAG_BG_PICK)
 							info("This was a "
 							     "copy %s",
 							     bg_record->
@@ -630,8 +630,8 @@ static int _check_for_booted_overlapping_blocks(
 							bg_lists->main,
 							found_record);
 					} else {
-						if(bg_conf->slurm_debug_flags
-						   & DEBUG_FLAG_BG_PICK)
+						if (bg_conf->slurm_debug_flags
+						    & DEBUG_FLAG_BG_PICK)
 							info("looking for "
 							     "original");
 						found_record =
@@ -640,15 +640,15 @@ static int _check_for_booted_overlapping_blocks(
 								bg_record);
 					}
 
-					if(bg_conf->slurm_debug_flags
-					   & DEBUG_FLAG_BG_PICK)
+					if (bg_conf->slurm_debug_flags
+					    & DEBUG_FLAG_BG_PICK)
 						info("Removing unusable block "
 						     "%s from the system.",
 						     bg_record->bg_block_id);
 
-					if(!found_record) {
-						if(bg_conf->slurm_debug_flags
-						   & DEBUG_FLAG_BG_PICK)
+					if (!found_record) {
+						if (bg_conf->slurm_debug_flags
+						    & DEBUG_FLAG_BG_PICK)
 							info("This record %s "
 							     "wasn't found in "
 							     "the "
@@ -670,7 +670,7 @@ static int _check_for_booted_overlapping_blocks(
 				}
 				rc = 1;
 
-				if(!is_test)
+				if (!is_test)
 					break;
 			}
 		}
@@ -700,28 +700,28 @@ static int _dynamically_request(List block_list, int *blocks_added,
 
 	memcpy(start_geo, request->geometry,
 	       sizeof(uint16_t)*SYSTEM_DIMENSIONS);
-	if(bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
+	if (bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
 		info("going to create %d", request->size);
 	list_of_lists = list_create(NULL);
 
 	/* If preempt is set and we are checking full system it means
 	   we altered the block list so only look at it.
 	*/
-	if(SELECT_IS_PREEMPT_SET(query_mode)
-	   && SELECT_IS_CHECK_FULL_SET(query_mode)) {
+	if (SELECT_IS_PREEMPT_SET(query_mode)
+	    && SELECT_IS_CHECK_FULL_SET(query_mode)) {
 		list_append(list_of_lists, block_list);
-	} else if(user_req_nodes)
+	} else if (user_req_nodes)
 		list_append(list_of_lists, bg_lists->job_running);
 	else {
 		list_append(list_of_lists, block_list);
-		if(list_count(block_list) != list_count(bg_lists->booted)) {
+		if (list_count(block_list) != list_count(bg_lists->booted)) {
 			list_append(list_of_lists, bg_lists->booted);
-			if(list_count(bg_lists->booted)
-			   != list_count(bg_lists->job_running))
+			if (list_count(bg_lists->booted)
+			    != list_count(bg_lists->job_running))
 				list_append(list_of_lists,
 					    bg_lists->job_running);
-		} else if(list_count(block_list)
-			  != list_count(bg_lists->job_running)) {
+		} else if (list_count(block_list)
+			   != list_count(bg_lists->job_running)) {
 			list_append(list_of_lists, bg_lists->job_running);
 		}
 	}
@@ -735,17 +735,17 @@ static int _dynamically_request(List block_list, int *blocks_added,
 		   3- see if we can create one in the non
 		   job running bps
 		*/
-		if(bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
+		if (bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
 			info("trying with %d", create_try);
-		if((new_blocks = create_dynamic_block(block_list,
-						      request, temp_list,
-						      true))) {
+		if ((new_blocks = create_dynamic_block(block_list,
+						       request, temp_list,
+						       true))) {
 			bg_record_t *bg_record = NULL;
 
-			while((bg_record = list_pop(new_blocks))) {
-				if(block_exist_in_list(block_list, bg_record))
+			while ((bg_record = list_pop(new_blocks))) {
+				if (block_exist_in_list(block_list, bg_record))
 					destroy_bg_record(bg_record);
-				else if(SELECT_IS_TEST(query_mode)) {
+				else if (SELECT_IS_TEST(query_mode)) {
 					/* Here we don't really want
 					   to create the block if we
 					   are testing.
@@ -753,8 +753,8 @@ static int _dynamically_request(List block_list, int *blocks_added,
 					list_append(block_list, bg_record);
 					(*blocks_added) = 1;
 				} else {
-					if(configure_block(bg_record)
-					   == SLURM_ERROR) {
+					if (configure_block(bg_record)
+					    == SLURM_ERROR) {
 						destroy_bg_record(bg_record);
 						error("_dynamically_request: "
 						      "unable to configure "
@@ -768,7 +768,7 @@ static int _dynamically_request(List block_list, int *blocks_added,
 				}
 			}
 			list_destroy(new_blocks);
-			if(!*blocks_added) {
+			if (!*blocks_added) {
 				memcpy(request->geometry, start_geo,
 				       sizeof(uint16_t)*SYSTEM_DIMENSIONS);
 				rc = SLURM_ERROR;
@@ -790,7 +790,7 @@ static int _dynamically_request(List block_list, int *blocks_added,
 	}
 	list_iterator_destroy(itr);
 
-	if(list_of_lists)
+	if (list_of_lists)
 		list_destroy(list_of_lists);
 
 	return rc;
@@ -835,24 +835,24 @@ static int _find_best_block_match(List block_list,
 	List overlapped_list = NULL;
 	bool is_test = SELECT_IS_TEST(query_mode);
 
-	if(!total_cpus)
+	if (!total_cpus)
 		total_cpus = DIM_SIZE[X] * DIM_SIZE[Y] * DIM_SIZE[Z]
 			* bg_conf->cpus_per_bp;
 
-	if(req_nodes > max_nodes) {
+	if (req_nodes > max_nodes) {
 		error("can't run this job max bps is %u asking for %u",
 		      max_nodes, req_nodes);
 		return SLURM_ERROR;
 	}
 
-	if(!is_test && (req_procs > avail_cpus)) {
-		if(bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
+	if (!is_test && (req_procs > avail_cpus)) {
+		if (bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
 			info("asking for %u I only have %d",
 			     req_procs, avail_cpus);
 		return SLURM_ERROR;
 	}
 
-	if(!block_list) {
+	if (!block_list) {
 		error("_find_best_block_match: There is no block_list");
 		return SLURM_ERROR;
 	}
@@ -865,20 +865,20 @@ static int _find_best_block_match(List block_list,
 			   SELECT_JOBDATA_ROTATE, &rotate);
 
 #ifdef HAVE_BGL
-	if((rc = _check_images(job_ptr, &blrtsimage, &linuximage,
-			       &mloaderimage, &ramdiskimage)) == SLURM_ERROR)
+	if ((rc = _check_images(job_ptr, &blrtsimage, &linuximage,
+				&mloaderimage, &ramdiskimage)) == SLURM_ERROR)
 		goto end_it;
 #else
-	if((rc = _check_images(job_ptr, &linuximage,
-			       &mloaderimage, &ramdiskimage)) == SLURM_ERROR)
+	if ((rc = _check_images(job_ptr, &linuximage,
+				&mloaderimage, &ramdiskimage)) == SLURM_ERROR)
 		goto end_it;
 #endif
 
-	if(req_geometry[X] != 0 && req_geometry[X] != (uint16_t)NO_VAL) {
+	if (req_geometry[X] != 0 && req_geometry[X] != (uint16_t)NO_VAL) {
 		target_size = 1;
 		for (i=0; i<SYSTEM_DIMENSIONS; i++)
 			target_size *= req_geometry[i];
-		if(target_size != min_nodes) {
+		if (target_size != min_nodes) {
 			debug2("min_nodes not set correctly %u "
 			       "should be %u from %u%u%u",
 			       min_nodes, target_size,
@@ -887,7 +887,7 @@ static int _find_best_block_match(List block_list,
 			       req_geometry[Z]);
 			min_nodes = target_size;
 		}
-		if(!req_nodes)
+		if (!req_nodes)
 			req_nodes = min_nodes;
 	} else {
 		req_geometry[X] = (uint16_t)NO_VAL;
@@ -917,7 +917,7 @@ static int _find_best_block_match(List block_list,
 	request.linuximage = linuximage;
 	request.mloaderimage = mloaderimage;
 	request.ramdiskimage = ramdiskimage;
-	if(job_ptr->details->req_node_bitmap)
+	if (job_ptr->details->req_node_bitmap)
 		request.avail_node_bitmap = job_ptr->details->req_node_bitmap;
 	else
 		request.avail_node_bitmap = slurm_block_bitmap;
@@ -925,17 +925,17 @@ static int _find_best_block_match(List block_list,
 	/* since we only look at procs after this and not nodes we
 	 *  need to set a max_cpus if given
 	 */
-	if(max_cpus == (uint32_t)NO_VAL)
+	if (max_cpus == (uint32_t)NO_VAL)
 		max_cpus = max_nodes * bg_conf->cpus_per_bp;
 
-	while(1) {
+	while (1) {
 		/* Here we are creating a list of all the blocks that
 		 * have overlapped jobs so if we don't find one that
 		 * works we will have can look and see the earliest
 		 * the job can start.  This doesn't apply to Dynamic mode.
 		 */
-		if(is_test && SELECT_IS_CHECK_FULL_SET(query_mode)
-		   && bg_conf->layout_mode != LAYOUT_DYNAMIC)
+		if (is_test && SELECT_IS_CHECK_FULL_SET(query_mode)
+		    && bg_conf->layout_mode != LAYOUT_DYNAMIC)
 			overlapped_list = list_create(NULL);
 
 		bg_record = _find_matching_block(block_list,
@@ -947,29 +947,29 @@ static int _find_best_block_match(List block_list,
 						 overlap_check,
 						 overlapped_list,
 						 query_mode);
-		if(!bg_record && overlapped_list
-		   && list_count(overlapped_list)) {
+		if (!bg_record && overlapped_list
+		    && list_count(overlapped_list)) {
 			ListIterator itr =
 				list_iterator_create(overlapped_list);
 			bg_record_t *tmp_rec = NULL;
-			while((tmp_rec = list_next(itr))) {
-				if(!bg_record ||
-				   (tmp_rec->job_ptr->end_time <
-				    bg_record->job_ptr->end_time))
+			while ((tmp_rec = list_next(itr))) {
+				if (!bg_record ||
+				    (tmp_rec->job_ptr->end_time <
+				     bg_record->job_ptr->end_time))
 					bg_record = tmp_rec;
 			}
 			list_iterator_destroy(itr);
 		}
 
-		if(overlapped_list)
+		if (overlapped_list)
 			list_destroy(overlapped_list);
 
 		/* set the bitmap and do other allocation activities */
 		if (bg_record) {
-			if(!is_test) {
-				if(check_block_bp_states(
-					   bg_record->bg_block_id, 1)
-				   != SLURM_SUCCESS) {
+			if (!is_test) {
+				if (check_block_bp_states(
+					    bg_record->bg_block_id, 1)
+				    != SLURM_SUCCESS) {
 					/* check_block_bp_states will
 					   set this block in the main
 					   list to an error state, but
@@ -1006,7 +1006,7 @@ static int _find_best_block_match(List block_list,
 		}
 
 		/* see if we can just reset the image and reboot the block */
-		if(allow) {
+		if (allow) {
 			check_image = 0;
 			allow = 0;
 			continue;
@@ -1016,20 +1016,20 @@ static int _find_best_block_match(List block_list,
 
 		/* all these assume that the *bg_record is NULL */
 
-		if(bg_conf->layout_mode == LAYOUT_OVERLAP
-		   && !is_test && overlap_check < 2) {
+		if (bg_conf->layout_mode == LAYOUT_OVERLAP
+		    && !is_test && overlap_check < 2) {
 			overlap_check++;
 			continue;
 		}
 
-		if(create_try || bg_conf->layout_mode != LAYOUT_DYNAMIC)
+		if (create_try || bg_conf->layout_mode != LAYOUT_DYNAMIC)
 			goto no_match;
 
-		if((rc = _dynamically_request(block_list, blocks_added,
-					      &request,
-					      job_ptr->details->req_nodes,
-					      query_mode))
-		   == SLURM_SUCCESS) {
+		if ((rc = _dynamically_request(block_list, blocks_added,
+					       &request,
+					       job_ptr->details->req_nodes,
+					       query_mode))
+		    == SLURM_SUCCESS) {
 			create_try = 1;
 			continue;
 		}
@@ -1037,11 +1037,11 @@ static int _find_best_block_match(List block_list,
 		/* Only look at the full system if we aren't going to
 		   preempt jobs later and look.
 		*/
-		if(is_test && SELECT_IS_CHECK_FULL_SET(query_mode)) {
+		if (is_test && SELECT_IS_CHECK_FULL_SET(query_mode)) {
 			List new_blocks = NULL;
 			List job_list = list_create(NULL);
 			ListIterator itr = NULL;
-			if(bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
+			if (bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
 				info("trying with empty machine");
 
 			/* Here we need to make sure the blocks in the
@@ -1050,8 +1050,8 @@ static int _find_best_block_match(List block_list,
 			   separate list.
 			*/
 			itr = list_iterator_create(block_list);
-			while((bg_record = list_next(itr))) {
-				if(bg_record->job_running != NO_JOB_RUNNING)
+			while ((bg_record = list_next(itr))) {
+				if (bg_record->job_running != NO_JOB_RUNNING)
 					list_append(job_list, bg_record);
 				/* Since the error blocks are at the
 				   end we only really need to look at
@@ -1065,7 +1065,7 @@ static int _find_best_block_match(List block_list,
 				   until the error is removed which
 				   could be a very long time.
 				*/
-				if(bg_record->job_running == BLOCK_ERROR_STATE)
+				if (bg_record->job_running == BLOCK_ERROR_STATE)
 					break;
 			}
 			list_iterator_destroy(itr);
@@ -1074,17 +1074,17 @@ static int _find_best_block_match(List block_list,
 			   earliest avaliable first,
 			   so the job list will also be. No need to
 			   sort. */
-			while(1) {
+			while (1) {
 				bool track_down_nodes = true;
 				/* this gets altered in
 				 * create_dynamic_block so we reset it */
 				for(i=0; i<SYSTEM_DIMENSIONS; i++)
 					request.geometry[i] = req_geometry[i];
 
-				if((bg_record = list_pop(job_list))) {
-					if(bg_record->job_ptr) {
-						if(bg_conf->slurm_debug_flags
-						   & DEBUG_FLAG_BG_PICK)
+				if ((bg_record = list_pop(job_list))) {
+					if (bg_record->job_ptr) {
+						if (bg_conf->slurm_debug_flags
+						    & DEBUG_FLAG_BG_PICK)
 							info("taking off "
 							     "%d(%s) started "
 							     "at %ld ends "
@@ -1112,10 +1112,11 @@ static int _find_best_block_match(List block_list,
 						*/
 						bg_record->job_running =
 							NO_JOB_RUNNING;
-					} else if((bg_record->job_running
-						   == BLOCK_ERROR_STATE)
-						  && (bg_conf->slurm_debug_flags
-						      & DEBUG_FLAG_BG_PICK))
+					} else if ((bg_record->job_running
+						    == BLOCK_ERROR_STATE)
+						   && (bg_conf->
+						       slurm_debug_flags
+						       & DEBUG_FLAG_BG_PICK))
 						info("taking off (%s) "
 						     "which is in an "
 						     "error state",
@@ -1128,11 +1129,11 @@ static int _find_best_block_match(List block_list,
 					   node on the system.
 					*/
 					track_down_nodes = false;
-				if(!(new_blocks = create_dynamic_block(
-					     block_list, &request, job_list,
-					     track_down_nodes))) {
-					if(errno == ESLURM_INTERCONNECT_FAILURE
-					   || !list_count(job_list)) {
+				if (!(new_blocks = create_dynamic_block(
+					      block_list, &request, job_list,
+					      track_down_nodes))) {
+					if (errno == ESLURM_INTERCONNECT_FAILURE
+					    || !list_count(job_list)) {
 						char *nodes;
 						if (slurmctld_conf.
 						    slurmctld_debug < 5)
@@ -1154,17 +1155,17 @@ static int _find_best_block_match(List block_list,
 				 * about it now
 				 */
 				(*found_bg_record) = list_pop(new_blocks);
-				if(!(*found_bg_record)) {
+				if (!(*found_bg_record)) {
 					list_destroy(new_blocks);
-					if(!bg_record) {
+					if (!bg_record) {
 						/* This should never happen */
 						error("got an empty list back");
 						rc = SLURM_ERROR;
 						break;
 					}
 
-					if(bg_conf->slurm_debug_flags
-					   & DEBUG_FLAG_BG_PICK)
+					if (bg_conf->slurm_debug_flags
+					    & DEBUG_FLAG_BG_PICK)
 						info("Appears we are trying "
 						     "to place this job on "
 						     "the block we just "
@@ -1180,7 +1181,7 @@ static int _find_best_block_match(List block_list,
 				bit_and(slurm_block_bitmap,
 					(*found_bg_record)->bitmap);
 
-				if(bg_record) {
+				if (bg_record) {
 					(*found_bg_record)->job_running =
 						bg_record->job_running;
 					(*found_bg_record)->job_ptr
@@ -1224,22 +1225,22 @@ static int _sync_block_lists(List full_list, List incomp_list)
 
 	itr = list_iterator_create(full_list);
 	itr2 = list_iterator_create(incomp_list);
-	while((new_record = list_next(itr))) {
+	while ((new_record = list_next(itr))) {
 		/* Make sure we aren't adding any block that doesn't
 		   have a block_id.
 		*/
-		if(!new_record->bg_block_id)
+		if (!new_record->bg_block_id)
 			continue;
-		while((bg_record = list_next(itr2))) {
-			if(bit_equal(bg_record->bitmap, new_record->bitmap)
-			   && bit_equal(bg_record->ionode_bitmap,
-					new_record->ionode_bitmap))
+		while ((bg_record = list_next(itr2))) {
+			if (bit_equal(bg_record->bitmap, new_record->bitmap)
+			    && bit_equal(bg_record->ionode_bitmap,
+					 new_record->ionode_bitmap))
 				break;
 		}
 
-		if(!bg_record) {
+		if (!bg_record) {
 			list_remove(itr);
-			if(bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
+			if (bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
 				info("sync: adding %s %zx",
 				     new_record->bg_block_id,
 				     (size_t)new_record);
@@ -1256,7 +1257,8 @@ static int _sync_block_lists(List full_list, List incomp_list)
 	return count;
 }
 
-/* static void _build_select_struct(struct job_record *job_ptr, bitstr_t *bitmap, uint32_t node_cnt2) */
+/* static void _build_select_struct(struct job_record *job_ptr, */
+/*                                  bitstr_t *bitmap, uint32_t node_cnt2) */
 /* { */
 /* 	int i, j, k; */
 /* 	int first_bit, last_bit; */
@@ -1270,8 +1272,8 @@ static int _sync_block_lists(List full_list, List incomp_list)
 
 /* 	node_cnt = bit_set_count(bitmap); */
 /* 	job_ptr->select_job = job_resrcs_ptr = create_job_resources(); */
-/* 	job_resrcs_ptr->cpu_array_reps = xmalloc(sizeof(uint32_t) * node_cnt); */
-/* 	job_resrcs_ptr->cpu_array_value = xmalloc(sizeof(uint16_t) * node_cnt); */
+/* 	job_resrcs_ptr->cpu_array_reps = xmalloc(sizeof(uint32_t)*node_cnt);*/
+/* 	job_resrcs_ptr->cpu_array_value = xmalloc(sizeof(uint16_t)*node_cnt);*/
 /* 	job_resrcs_ptr->cpus = xmalloc(sizeof(uint16_t) * node_cnt); */
 /* 	job_resrcs_ptr->cpus_used = xmalloc(sizeof(uint16_t) * node_cnt); */
 /* 	job_resrcs_ptr->nhosts = node_cnt; */
@@ -1279,7 +1281,8 @@ static int _sync_block_lists(List full_list, List incomp_list)
 /* 	if (job_resrcs_ptr->node_bitmap == NULL) */
 /* 		fatal("bit_copy malloc failure"); */
 /* 	job_resrcs_ptr->ncpus = job_ptr->num_cpus; */
-/* 	if (build_job_resources(job_resrcs_ptr, (void *)node_record_table_ptr, 1)) */
+/* 	if (build_job_resources(job_resrcs_ptr, (void
+ * 	*)node_record_table_ptr, 1)) */
 /* 		error("select_p_job_test: build_job_resources: %m"); */
 
 /* 	if (job_ptr->num_cpus <= bg_conf->cpus_per_bp) */
@@ -1304,12 +1307,13 @@ static int _sync_block_lists(List full_list, List incomp_list)
 /* 		total_cpus += node_cpus; */
 /* #if 0 */
 /* 		/\* This function could be used to control allocation of */
-/* 		 * specific c-nodes for multiple job steps per job allocation. */
+/* 		 * specific c-nodes for multiple job steps per job allocation.*/
 /* 		 * Such functionality is not currently support on BlueGene */
 /* 		 * systems. */
-/* 		 * Also see #ifdef HAVE_BG logic in common/job_resources.c *\/ */
+/* 		 * Also see #ifdef HAVE_BG logic in common/job_resources.c *\/*/
 /* 		if (set_job_resources_node(job_resrcs_ptr, j)) */
-/* 			error("select_p_job_test: set_job_resources_node: %m"); */
+/* 			error("select_p_job_test:
+ * 			set_job_resources_node: %m"); */
 /* #endif */
 /* 		j++; */
 /* 	} */
@@ -1347,7 +1351,7 @@ static void _build_select_struct(struct job_record *job_ptr,
 		fatal("bit_copy malloc failure");
 
 	job_resrcs_ptr->cpu_array_cnt = 1;
-	if(job_ptr->details->min_cpus < bg_conf->cpus_per_bp)
+	if (job_ptr->details->min_cpus < bg_conf->cpus_per_bp)
 		job_resrcs_ptr->cpu_array_value[0] = job_ptr->details->min_cpus;
 	else
 		job_resrcs_ptr->cpu_array_value[0] = bg_conf->cpus_per_bp;
@@ -1379,22 +1383,22 @@ static List _get_preemptables(uint16_t query_mode, bg_record_t *bg_record,
 	slurm_mutex_lock(&block_state_mutex);
 	job_itr = list_iterator_create(preempt_jobs);
 	itr = list_iterator_create(bg_lists->main);
-	while((found_record = list_next(itr))) {
+	while ((found_record = list_next(itr))) {
 		if (!found_record->job_ptr
 		    || (!found_record->bg_block_id)
 		    || (bg_record == found_record)
 		    || !blocks_overlap(bg_record, found_record))
 			continue;
 
-		while((job_ptr = list_next(job_itr))) {
-			if(job_ptr == found_record->job_ptr)
+		while ((job_ptr = list_next(job_itr))) {
+			if (job_ptr == found_record->job_ptr)
 				break;
 		}
-		if(job_ptr) {
+		if (job_ptr) {
 			list_push(preempt, job_ptr);
 /* 			info("going to preempt %u running on %s", */
 /* 			     job_ptr->job_id, found_record->bg_block_id); */
-		} else if(SELECT_IS_MODE_RUN_NOW(query_mode)) {
+		} else if (SELECT_IS_MODE_RUN_NOW(query_mode)) {
 			error("Job %u running on block %s "
 			      "wasn't in the preempt list, but needs to be "
 			      "preempted for queried job to run on block %s",
@@ -1432,8 +1436,8 @@ static int _remove_preemptables(List block_list, List preempt_jobs)
 
 	job_itr = list_iterator_create(preempt_jobs);
 	itr = list_iterator_create(block_list);
-	while((job_ptr = list_next(job_itr))) {
-		while((found_record = list_next(itr))) {
+	while ((job_ptr = list_next(job_itr))) {
+		while ((found_record = list_next(itr))) {
 			if (found_record->job_ptr == job_ptr) {
 /* 				info("removing job %u running on %s", */
 /* 				     job_ptr->job_id, */
@@ -1446,7 +1450,7 @@ static int _remove_preemptables(List block_list, List preempt_jobs)
 		}
 		list_iterator_reset(itr);
 
-		if(!found_record)
+		if (!found_record)
 			error("Job %u wasn't found running anywhere, "
 			      "can't preempt",
 			      job_ptr->job_id);
@@ -1495,7 +1499,7 @@ extern int submit_job(struct job_record *job_ptr, bitstr_t *slurm_block_bitmap,
 	else
 		local_mode |= SELECT_MODE_CHECK_FULL;
 
-	if(bg_conf->layout_mode == LAYOUT_DYNAMIC)
+	if (bg_conf->layout_mode == LAYOUT_DYNAMIC)
 		slurm_mutex_lock(&create_dynamic_mutex);
 
 	slurm_mutex_lock(&block_state_mutex);
@@ -1504,12 +1508,12 @@ extern int submit_job(struct job_record *job_ptr, bitstr_t *slurm_block_bitmap,
 
 	get_select_jobinfo(job_ptr->select_jobinfo->data,
 			   SELECT_JOBDATA_CONN_TYPE, &conn_type);
-	if(conn_type == SELECT_NAV) {
-		if(bg_conf->bp_node_cnt == bg_conf->nodecard_node_cnt)
+	if (conn_type == SELECT_NAV) {
+		if (bg_conf->bp_node_cnt == bg_conf->nodecard_node_cnt)
 			conn_type = SELECT_SMALL;
-		else if(min_nodes > 1)
+		else if (min_nodes > 1)
 			conn_type = SELECT_TORUS;
-		else if(job_ptr->details->min_cpus < bg_conf->cpus_per_bp)
+		else if (job_ptr->details->min_cpus < bg_conf->cpus_per_bp)
 			conn_type = SELECT_SMALL;
 
 		set_select_jobinfo(job_ptr->select_jobinfo->data,
@@ -1517,10 +1521,10 @@ extern int submit_job(struct job_record *job_ptr, bitstr_t *slurm_block_bitmap,
 				   &conn_type);
 	}
 
-	if(slurm_block_bitmap && !bit_set_count(slurm_block_bitmap)) {
+	if (slurm_block_bitmap && !bit_set_count(slurm_block_bitmap)) {
 		error("no nodes given to place job %u.", job_ptr->job_id);
 
-		if(bg_conf->layout_mode == LAYOUT_DYNAMIC)
+		if (bg_conf->layout_mode == LAYOUT_DYNAMIC)
 			slurm_mutex_unlock(&create_dynamic_mutex);
 
 		return SLURM_ERROR;
@@ -1570,8 +1574,8 @@ preempt:
 				    max_nodes, req_nodes,
 				    &bg_record, local_mode, avail_cpus);
 
-	if(rc == SLURM_SUCCESS) {
-		if(bg_record) {
+	if (rc == SLURM_SUCCESS) {
+		if (bg_record) {
 			/* Here we see if there is a job running since
 			 * some jobs take awhile to finish we need to
 			 * make sure the time of the end is in the
@@ -1579,18 +1583,18 @@ preempt:
 			 * past or current time) we add 5 seconds to
 			 * it so we don't use the block immediately.
 			 */
-			if(bg_record->job_ptr
-			   && bg_record->job_ptr->end_time) {
-				if(bg_record->job_ptr->end_time <= starttime)
+			if (bg_record->job_ptr
+			    && bg_record->job_ptr->end_time) {
+				if (bg_record->job_ptr->end_time <= starttime)
 					starttime += 5;
 				else
 					starttime =
 						bg_record->job_ptr->end_time;
-			} else if(bg_record->job_running == BLOCK_ERROR_STATE)
+			} else if (bg_record->job_running == BLOCK_ERROR_STATE)
 				starttime = INFINITE;
 
 			/* make sure the job is eligible to run */
-			if(job_ptr->details->begin_time > starttime)
+			if (job_ptr->details->begin_time > starttime)
 				starttime = job_ptr->details->begin_time;
 
 			job_ptr->start_time = starttime;
@@ -1601,7 +1605,7 @@ preempt:
 			set_select_jobinfo(job_ptr->select_jobinfo->data,
 					   SELECT_JOBDATA_IONODES,
 					   bg_record->ionodes);
-			if(!bg_record->bg_block_id) {
+			if (!bg_record->bg_block_id) {
 				debug("%d can start unassigned job %u "
 				      "at %ld on %s",
 				      local_mode, job_ptr->job_id,
@@ -1616,8 +1620,8 @@ preempt:
 					SELECT_JOBDATA_NODE_CNT,
 					&bg_record->node_cnt);
 			} else {
-				if((bg_record->ionodes)
-				   && (job_ptr->part_ptr->max_share <= 1))
+				if ((bg_record->ionodes)
+				    && (job_ptr->part_ptr->max_share <= 1))
 					error("Small block used in "
 					      "non-shared partition");
 
@@ -1631,7 +1635,7 @@ preempt:
 						job_ptr->select_jobinfo->data,
 						SELECT_JOBDATA_BLOCK_ID,
 						bg_record->bg_block_id);
-					if(job_ptr) {
+					if (job_ptr) {
 						bg_record->job_running =
 							job_ptr->job_id;
 						bg_record->job_ptr = job_ptr;
@@ -1656,14 +1660,14 @@ preempt:
 						     slurm_block_bitmap,
 						     bg_record->node_cnt);
 			/* set up the preempted job list */
-			if(SELECT_IS_PREEMPT_SET(local_mode)) {
-				if(*preemptee_job_list)
+			if (SELECT_IS_PREEMPT_SET(local_mode)) {
+				if (*preemptee_job_list)
 					list_destroy(*preemptee_job_list);
 				*preemptee_job_list = _get_preemptables(
 					local_mode, bg_record,
 					preemptee_candidates);
 			}
-			if(!bg_record->bg_block_id) {
+			if (!bg_record->bg_block_id) {
 				/* This is a fake record so we need to
 				 * destroy it after we get the info from
 				 * it.  If it was just testing then
@@ -1673,7 +1677,7 @@ preempt:
 				 * lists.  But we don't want to do
 				 * that so we will set blocks_added to
 				 * 0 so it doesn't happen. */
-				if(!blocks_added) {
+				if (!blocks_added) {
 					destroy_bg_record(bg_record);
 					bg_record = NULL;
 				}
@@ -1683,8 +1687,8 @@ preempt:
 		} else {
 			error("we got a success, but no block back");
 		}
-	} else if(!preempt_done && SELECT_IS_PREEMPT_SET(local_mode)) {
-		if(bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
+	} else if (!preempt_done && SELECT_IS_PREEMPT_SET(local_mode)) {
+		if (bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
 			info("doing preemption");
 		local_mode |= SELECT_MODE_CHECK_FULL;
 		avail_cpus += _remove_preemptables(
@@ -1693,9 +1697,9 @@ preempt:
 		goto preempt;
 	}
 
-	if(bg_conf->layout_mode == LAYOUT_DYNAMIC) {
+	if (bg_conf->layout_mode == LAYOUT_DYNAMIC) {
 		slurm_mutex_lock(&block_state_mutex);
-		if(blocks_added)
+		if (blocks_added)
 			_sync_block_lists(block_list, bg_lists->main);
 		slurm_mutex_unlock(&block_state_mutex);
 		slurm_mutex_unlock(&create_dynamic_mutex);
diff --git a/src/plugins/select/bluegene/plugin/bg_job_run.c b/src/plugins/select/bluegene/plugin/bg_job_run.c
index ac5fd60b0438e95b6e1b5e94b4ba4cdcda99c110..6539c27a5d46815cf274df74336bd6b9800b5180 100644
--- a/src/plugins/select/bluegene/plugin/bg_job_run.c
+++ b/src/plugins/select/bluegene/plugin/bg_job_run.c
@@ -114,7 +114,7 @@ static int _remove_job(db_job_id_t job_id, char *block_id)
 	bool is_history = false;
 
 	debug("removing job %d from MMCS on block %s", job_id, block_id);
-	while(1) {
+	while (1) {
 		if (count)
 			sleep(POLL_INTERVAL);
 		count++;
@@ -169,20 +169,20 @@ static int _remove_job(db_job_id_t job_id, char *block_id)
 		       job_id, block_id, job_state, is_history);
 
 		/* check the state and process accordingly */
-		if(is_history) {
+		if (is_history) {
 			debug2("Job %d on block %s isn't in the "
 			       "active job table anymore, final state was %d",
 			       job_id, block_id, job_state);
 			return STATUS_OK;
-		} else if(job_state == RM_JOB_TERMINATED)
+		} else if (job_state == RM_JOB_TERMINATED)
 			return STATUS_OK;
-		else if(job_state == RM_JOB_DYING) {
-			if(count > MAX_POLL_RETRIES)
+		else if (job_state == RM_JOB_DYING) {
+			if (count > MAX_POLL_RETRIES)
 				error("Job %d on block %s isn't dying, "
 				      "trying for %d seconds", job_id,
 				      block_id, count*POLL_INTERVAL);
 			continue;
-		} else if(job_state == RM_JOB_ERROR) {
+		} else if (job_state == RM_JOB_ERROR) {
 			error("job %d on block %s is in a error state.",
 			      job_id, block_id);
 
@@ -211,14 +211,14 @@ static int _remove_job(db_job_id_t job_id, char *block_id)
 				      job_id, block_id);
 				return STATUS_OK;
 			}
-			if(rc == INCOMPATIBLE_STATE)
+			if (rc == INCOMPATIBLE_STATE)
 				debug("job %d on block %s is in an "
 				      "INCOMPATIBLE_STATE",
 				      job_id, block_id);
 			else
 				error("bridge_signal_job(%d): %s", job_id,
 				      bg_err_str(rc));
-		} else if(count > MAX_POLL_RETRIES)
+		} else if (count > MAX_POLL_RETRIES)
 			error("Job %d on block %s is in state %d and "
 			      "isn't dying, and doesn't appear to be "
 			      "responding to SIGTERM, trying for %d seconds",
@@ -236,15 +236,15 @@ static int _remove_job(db_job_id_t job_id, char *block_id)
 static int _reset_block(bg_record_t *bg_record)
 {
 	int rc = SLURM_SUCCESS;
-	if(bg_record) {
-		if(bg_record->job_running > NO_JOB_RUNNING) {
+	if (bg_record) {
+		if (bg_record->job_running > NO_JOB_RUNNING) {
 			bg_record->job_running = NO_JOB_RUNNING;
 			bg_record->job_ptr = NULL;
 		}
 		/* remove user from list */
 
-		if(bg_record->target_name) {
-			if(strcmp(bg_record->target_name,
+		if (bg_record->target_name) {
+			if (strcmp(bg_record->target_name,
 				  bg_conf->slurm_user_name)) {
 				xfree(bg_record->target_name);
 				bg_record->target_name =
@@ -270,8 +270,8 @@ static int _reset_block(bg_record_t *bg_record)
 		   error state could also be in this list and we don't
 		   want to remove them.
 		*/
-		if(bg_record->job_running == NO_JOB_RUNNING)
-			if(remove_from_bg_list(bg_lists->job_running,
+		if (bg_record->job_running == NO_JOB_RUNNING)
+			if (remove_from_bg_list(bg_lists->job_running,
 					       bg_record)
 			   == SLURM_SUCCESS) {
 				num_unused_cpus += bg_record->cpu_cnt;
@@ -336,10 +336,10 @@ static void _remove_jobs_on_block_and_reset(rm_job_list_t *job_list,
 	int i, rc;
 #endif
 
-	if(!job_list)
+	if (!job_list)
 		job_cnt = 0;
 
-	if(!block_id) {
+	if (!block_id) {
 		error("_remove_jobs_on_block_and_reset: no block name given");
 		return;
 	}
@@ -364,7 +364,7 @@ static void _remove_jobs_on_block_and_reset(rm_job_list_t *job_list,
 			}
 		}
 
-		if(!job_elem) {
+		if (!job_elem) {
 			error("No Job Elem breaking out job count = %d", i);
 			break;
 		}
@@ -376,7 +376,7 @@ static void _remove_jobs_on_block_and_reset(rm_job_list_t *job_list,
 			continue;
 		}
 
-		if(!job_block) {
+		if (!job_block) {
 			error("No blockID returned from Database");
 			continue;
 		}
@@ -398,7 +398,7 @@ static void _remove_jobs_on_block_and_reset(rm_job_list_t *job_list,
 			continue;
 		}
 		debug2("got job_id %d",job_id);
-		if((rc = _remove_job(job_id, block_id)) == INTERNAL_ERROR) {
+		if ((rc = _remove_job(job_id, block_id)) == INTERNAL_ERROR) {
 			job_remove_failed = 1;
 			break;
 		}
@@ -407,13 +407,13 @@ static void _remove_jobs_on_block_and_reset(rm_job_list_t *job_list,
 	/* remove the block's users */
 	slurm_mutex_lock(&block_state_mutex);
 	bg_record = find_bg_record_in_list(bg_lists->main, block_id);
-	if(bg_record) {
+	if (bg_record) {
 		debug("got the record %s user is %s",
 		      bg_record->bg_block_id,
 		      bg_record->user_name);
 
-		if(job_remove_failed) {
-			if(bg_record->nodes)
+		if (job_remove_failed) {
+			if (bg_record->nodes)
 				slurm_drain_nodes(
 					bg_record->nodes,
 					"_term_agent: Couldn't remove job",
@@ -428,7 +428,7 @@ static void _remove_jobs_on_block_and_reset(rm_job_list_t *job_list,
 		debug2("Hopefully we are destroying this block %s "
 		       "since it isn't in the bg_lists->main",
 		       block_id);
-	} else if(job_cnt) {
+	} else if (job_cnt) {
 		error("Could not find block %s previously assigned to job.  "
 		      "If this is happening at startup and you just changed "
 		      "your bluegene.conf this is expected.  Else you should "
@@ -451,7 +451,7 @@ static void _reset_block_list(List block_list)
 	int live_states, rc;
 #endif
 
-	if(!block_list)
+	if (!block_list)
 		return;
 
 #ifdef HAVE_BG_FILES
@@ -497,7 +497,7 @@ static void _sync_agent(bg_action_t *bg_action_ptr)
 	slurm_mutex_lock(&block_state_mutex);
 	bg_record = find_bg_record_in_list(bg_lists->main,
 					   bg_action_ptr->bg_block_id);
-	if(!bg_record) {
+	if (!bg_record) {
 		slurm_mutex_unlock(&block_state_mutex);
 		error("No block %s", bg_action_ptr->bg_block_id);
 		bg_requeue_job(bg_action_ptr->job_ptr->job_id, 1);
@@ -510,19 +510,19 @@ static void _sync_agent(bg_action_t *bg_action_ptr)
 	bg_record->job_running = bg_action_ptr->job_ptr->job_id;
 	bg_record->job_ptr = bg_action_ptr->job_ptr;
 
-	if(!block_ptr_exist_in_list(bg_lists->job_running, bg_record)) {
+	if (!block_ptr_exist_in_list(bg_lists->job_running, bg_record)) {
 		list_push(bg_lists->job_running, bg_record);
 		num_unused_cpus -= bg_record->cpu_cnt;
 	}
-	if(!block_ptr_exist_in_list(bg_lists->booted, bg_record))
+	if (!block_ptr_exist_in_list(bg_lists->booted, bg_record))
 		list_push(bg_lists->booted, bg_record);
 
-	if(bg_record->state == RM_PARTITION_READY) {
-		if(bg_record->job_ptr) {
+	if (bg_record->state == RM_PARTITION_READY) {
+		if (bg_record->job_ptr) {
 			bg_record->job_ptr->job_state &= (~JOB_CONFIGURING);
 			last_job_update = time(NULL);
 		}
-		if(bg_record->user_uid != bg_action_ptr->job_ptr->user_id) {
+		if (bg_record->user_uid != bg_action_ptr->job_ptr->user_id) {
 			int set_user_rc = SLURM_SUCCESS;
 
 			debug("User isn't correct for job %d on %s, "
@@ -535,13 +535,13 @@ static void _sync_agent(bg_action_t *bg_action_ptr)
 			set_user_rc = set_block_user(bg_record);
 			slurm_mutex_unlock(&block_state_mutex);
 
-			if(set_user_rc == SLURM_ERROR)
+			if (set_user_rc == SLURM_ERROR)
 				(void) slurm_fail_job(bg_record->job_running);
 		} else
 			slurm_mutex_unlock(&block_state_mutex);
 
 	} else {
-		if(bg_record->state != RM_PARTITION_CONFIGURING) {
+		if (bg_record->state != RM_PARTITION_CONFIGURING) {
 			error("Block %s isn't ready and isn't "
 			      "being configured! Starting job again.",
 			      bg_action_ptr->bg_block_id);
@@ -568,7 +568,7 @@ static void _start_agent(bg_action_t *bg_action_ptr)
 	bg_record = find_bg_record_in_list(bg_lists->main,
 					   bg_action_ptr->bg_block_id);
 
-	if(!bg_record) {
+	if (!bg_record) {
 		slurm_mutex_unlock(&block_state_mutex);
 		error("block %s not found in bg_lists->main",
 		      bg_action_ptr->bg_block_id);
@@ -576,7 +576,7 @@ static void _start_agent(bg_action_t *bg_action_ptr)
 		return;
 	}
 
-	if(bg_record->job_running <= NO_JOB_RUNNING) {
+	if (bg_record->job_running <= NO_JOB_RUNNING) {
 		// _reset_block(bg_record); should already happened
 		slurm_mutex_unlock(&block_state_mutex);
 		debug("job %u finished during the queueing job "
@@ -584,7 +584,7 @@ static void _start_agent(bg_action_t *bg_action_ptr)
 		      bg_action_ptr->job_ptr->job_id);
 		return;
 	}
-	if(bg_record->state == RM_PARTITION_DEALLOCATING) {
+	if (bg_record->state == RM_PARTITION_DEALLOCATING) {
 		debug("Block is in Deallocating state, waiting for free.");
 		bg_free_block(bg_record, 1, 1);
 		/* no reason to reboot here since we are already
@@ -594,7 +594,7 @@ static void _start_agent(bg_action_t *bg_action_ptr)
 		   we need to make sure the block we want is still
 		   around.
 		*/
-		if(!_make_sure_block_still_exists(bg_action_ptr, bg_record)) {
+		if (!_make_sure_block_still_exists(bg_action_ptr, bg_record)) {
 			slurm_mutex_unlock(&block_state_mutex);
 			return;
 		}
@@ -606,14 +606,14 @@ static void _start_agent(bg_action_t *bg_action_ptr)
 		if ((!found_record) || (bg_record == found_record))
 			continue;
 
-		if(!blocks_overlap(bg_record, found_record)) {
+		if (!blocks_overlap(bg_record, found_record)) {
 			debug2("block %s isn't part of %s",
 			       found_record->bg_block_id,
 			       bg_record->bg_block_id);
 			continue;
 		}
 
-		if(found_record->job_ptr) {
+		if (found_record->job_ptr) {
 			error("Trying to start job %u on block %s, "
 			      "but there is a job %u running on an overlapping "
 			      "block %s it will not end until %ld.  "
@@ -634,7 +634,7 @@ static void _start_agent(bg_action_t *bg_action_ptr)
 	}
 	list_iterator_destroy(itr);
 
-	if(requeue_job) {
+	if (requeue_job) {
 		list_destroy(delete_list);
 
 		_reset_block(bg_record);
@@ -658,12 +658,12 @@ static void _start_agent(bg_action_t *bg_action_ptr)
 	}
 
 	slurm_mutex_lock(&block_state_mutex);
-	if(!_make_sure_block_still_exists(bg_action_ptr, bg_record)) {
+	if (!_make_sure_block_still_exists(bg_action_ptr, bg_record)) {
 		slurm_mutex_unlock(&block_state_mutex);
 		return;
 	}
 
-	if(bg_record->job_running <= NO_JOB_RUNNING) {
+	if (bg_record->job_running <= NO_JOB_RUNNING) {
 		// _reset_block(bg_record); should already happened
 		slurm_mutex_unlock(&block_state_mutex);
 		debug("job %u already finished before boot",
@@ -673,7 +673,7 @@ static void _start_agent(bg_action_t *bg_action_ptr)
 
 	rc = 0;
 #ifdef HAVE_BGL
-	if(bg_action_ptr->blrtsimage
+	if (bg_action_ptr->blrtsimage
 	   && strcasecmp(bg_action_ptr->blrtsimage, bg_record->blrtsimage)) {
 		debug3("changing BlrtsImage from %s to %s",
 		       bg_record->blrtsimage, bg_action_ptr->blrtsimage);
@@ -682,7 +682,7 @@ static void _start_agent(bg_action_t *bg_action_ptr)
 		rc = 1;
 	}
 #else
-	if((bg_action_ptr->conn_type >= SELECT_SMALL)
+	if ((bg_action_ptr->conn_type >= SELECT_SMALL)
 	   && (bg_action_ptr->conn_type != bg_record->conn_type)) {
 		debug3("changing small block mode from %s to %s",
 		       conn_type_string(bg_record->conn_type),
@@ -696,7 +696,7 @@ static void _start_agent(bg_action_t *bg_action_ptr)
 #endif
 	}
 #endif
-	if(bg_action_ptr->linuximage
+	if (bg_action_ptr->linuximage
 	   && strcasecmp(bg_action_ptr->linuximage, bg_record->linuximage)) {
 #ifdef HAVE_BGL
 		debug3("changing LinuxImage from %s to %s",
@@ -709,7 +709,7 @@ static void _start_agent(bg_action_t *bg_action_ptr)
 		bg_record->linuximage = xstrdup(bg_action_ptr->linuximage);
 		rc = 1;
 	}
-	if(bg_action_ptr->mloaderimage
+	if (bg_action_ptr->mloaderimage
 	   && strcasecmp(bg_action_ptr->mloaderimage,
 			 bg_record->mloaderimage)) {
 		debug3("changing MloaderImage from %s to %s",
@@ -718,7 +718,7 @@ static void _start_agent(bg_action_t *bg_action_ptr)
 		bg_record->mloaderimage = xstrdup(bg_action_ptr->mloaderimage);
 		rc = 1;
 	}
-	if(bg_action_ptr->ramdiskimage
+	if (bg_action_ptr->ramdiskimage
 	   && strcasecmp(bg_action_ptr->ramdiskimage,
 			 bg_record->ramdiskimage)) {
 #ifdef HAVE_BGL
@@ -733,12 +733,12 @@ static void _start_agent(bg_action_t *bg_action_ptr)
 		rc = 1;
 	}
 
-	if(rc) {
+	if (rc) {
 		bg_record->modifying = 1;
 
 		bg_free_block(bg_record, 1, 1);
 
-		if(!_make_sure_block_still_exists(bg_action_ptr, bg_record)) {
+		if (!_make_sure_block_still_exists(bg_action_ptr, bg_record)) {
 			slurm_mutex_unlock(&block_state_mutex);
 			return;
 		}
@@ -780,7 +780,7 @@ static void _start_agent(bg_action_t *bg_action_ptr)
 			error("bridge_modify_block(RM_MODIFY_IoloadImg): %s",
 			      bg_err_str(rc));
 
-		if(bg_action_ptr->conn_type > SELECT_SMALL) {
+		if (bg_action_ptr->conn_type > SELECT_SMALL) {
 			char *conn_type = NULL;
 			switch(bg_action_ptr->conn_type) {
 			case SELECT_HTC_S:
@@ -817,21 +817,21 @@ static void _start_agent(bg_action_t *bg_action_ptr)
 
 #endif
 		bg_record->modifying = 0;
-	} else if(bg_action_ptr->reboot) {
+	} else if (bg_action_ptr->reboot) {
 		bg_record->modifying = 1;
 
 		bg_free_block(bg_record, 1, 1);
 
-		if(!_make_sure_block_still_exists(bg_action_ptr, bg_record)) {
+		if (!_make_sure_block_still_exists(bg_action_ptr, bg_record)) {
 			slurm_mutex_unlock(&block_state_mutex);
 			return;
 		}
 		bg_record->modifying = 0;
 	}
 
-	if(bg_record->state == RM_PARTITION_FREE) {
-		if((rc = boot_block(bg_record)) != SLURM_SUCCESS) {
-			if(!_make_sure_block_still_exists(bg_action_ptr,
+	if (bg_record->state == RM_PARTITION_FREE) {
+		if ((rc = boot_block(bg_record)) != SLURM_SUCCESS) {
+			if (!_make_sure_block_still_exists(bg_action_ptr,
 							  bg_record)) {
 				slurm_mutex_unlock(&block_state_mutex);
 				return;
@@ -841,7 +841,7 @@ static void _start_agent(bg_action_t *bg_action_ptr)
 			bg_requeue_job(bg_action_ptr->job_ptr->job_id, 1);
 			return;
 		}
-		if(!_make_sure_block_still_exists(bg_action_ptr, bg_record)) {
+		if (!_make_sure_block_still_exists(bg_action_ptr, bg_record)) {
 			slurm_mutex_unlock(&block_state_mutex);
 			return;
 		}
@@ -849,7 +849,7 @@ static void _start_agent(bg_action_t *bg_action_ptr)
 		bg_record->boot_state = 1;
 
 
-	if(bg_record->job_running <= NO_JOB_RUNNING) {
+	if (bg_record->job_running <= NO_JOB_RUNNING) {
 		slurm_mutex_unlock(&block_state_mutex);
 		debug("job %u finished during the start of the boot "
 		      "(everything is ok)",
@@ -867,17 +867,17 @@ static void _start_agent(bg_action_t *bg_action_ptr)
 	debug("setting the target_name for Block %s to %s",
 	      bg_record->bg_block_id, bg_record->target_name);
 
-	if(bg_record->state == RM_PARTITION_READY) {
+	if (bg_record->state == RM_PARTITION_READY) {
 		debug("block %s is ready.", bg_record->bg_block_id);
 		set_user_rc = set_block_user(bg_record);
-		if(bg_action_ptr->job_ptr) {
+		if (bg_action_ptr->job_ptr) {
 			bg_action_ptr->job_ptr->job_state &= (~JOB_CONFIGURING);
 			last_job_update = time(NULL);
 		}
 	}
 	slurm_mutex_unlock(&block_state_mutex);
 
-	if(set_user_rc == SLURM_ERROR) {
+	if (set_user_rc == SLURM_ERROR) {
 		sleep(2);
 		/* wait for the slurmd to begin
 		   the batch script, slurm_fail_job()
@@ -983,7 +983,7 @@ static List _get_all_allocated_blocks(void)
 	if (!ret_list)
 		fatal("malloc error");
 
-	if(bg_lists->main) {
+	if (bg_lists->main) {
 		itr = list_iterator_create(bg_lists->main);
 		while ((block_ptr = (bg_record_t *) list_next(itr))) {
 			if ((block_ptr->user_name == NULL)
@@ -1014,7 +1014,7 @@ static int _excise_block(List block_list, pm_partition_id_t bg_block_id,
 	ListIterator iter;
 	bg_record_t *block = NULL;
 
-	if(block_list) {
+	if (block_list) {
 		iter = list_iterator_create(block_list);
 		xassert(iter);
 		while ((block = list_next(iter))) {
@@ -1095,7 +1095,7 @@ extern int start_job(struct job_record *job_ptr)
 	get_select_jobinfo(job_ptr->select_jobinfo->data,
 			   SELECT_JOBDATA_BLRTS_IMAGE,
 			   &(bg_action_ptr->blrtsimage));
-	if(!bg_action_ptr->blrtsimage) {
+	if (!bg_action_ptr->blrtsimage) {
 		bg_action_ptr->blrtsimage =
 			xstrdup(bg_conf->default_blrtsimage);
 		set_select_jobinfo(job_ptr->select_jobinfo->data,
@@ -1111,7 +1111,7 @@ extern int start_job(struct job_record *job_ptr)
 	get_select_jobinfo(job_ptr->select_jobinfo->data,
 			   SELECT_JOBDATA_LINUX_IMAGE,
 			   &(bg_action_ptr->linuximage));
-	if(!bg_action_ptr->linuximage) {
+	if (!bg_action_ptr->linuximage) {
 		bg_action_ptr->linuximage =
 			xstrdup(bg_conf->default_linuximage);
 		set_select_jobinfo(job_ptr->select_jobinfo->data,
@@ -1121,7 +1121,7 @@ extern int start_job(struct job_record *job_ptr)
 	get_select_jobinfo(job_ptr->select_jobinfo->data,
 			   SELECT_JOBDATA_MLOADER_IMAGE,
 			   &(bg_action_ptr->mloaderimage));
-	if(!bg_action_ptr->mloaderimage) {
+	if (!bg_action_ptr->mloaderimage) {
 		bg_action_ptr->mloaderimage =
 			xstrdup(bg_conf->default_mloaderimage);
 		set_select_jobinfo(job_ptr->select_jobinfo->data,
@@ -1131,7 +1131,7 @@ extern int start_job(struct job_record *job_ptr)
 	get_select_jobinfo(job_ptr->select_jobinfo->data,
 			   SELECT_JOBDATA_RAMDISK_IMAGE,
 			   &(bg_action_ptr->ramdiskimage));
-	if(!bg_action_ptr->ramdiskimage) {
+	if (!bg_action_ptr->ramdiskimage) {
 		bg_action_ptr->ramdiskimage =
 			xstrdup(bg_conf->default_ramdiskimage);
 		set_select_jobinfo(job_ptr->select_jobinfo->data,
@@ -1154,11 +1154,11 @@ extern int start_job(struct job_record *job_ptr)
 	job_ptr->total_cpus = job_ptr->details->min_cpus = bg_record->cpu_cnt;
 	bg_record->job_running = bg_action_ptr->job_ptr->job_id;
 	bg_record->job_ptr = bg_action_ptr->job_ptr;
-	if(!block_ptr_exist_in_list(bg_lists->job_running, bg_record)) {
+	if (!block_ptr_exist_in_list(bg_lists->job_running, bg_record)) {
 		list_push(bg_lists->job_running, bg_record);
 		num_unused_cpus -= bg_record->cpu_cnt;
 	}
-	if(!block_ptr_exist_in_list(bg_lists->booted, bg_record))
+	if (!block_ptr_exist_in_list(bg_lists->booted, bg_record))
 		list_push(bg_lists->booted, bg_record);
 	slurm_mutex_unlock(&block_state_mutex);
 
@@ -1218,7 +1218,7 @@ extern int sync_jobs(List job_list)
 
 	/* Insure that all running jobs own the specified block */
 	block_list = _get_all_allocated_blocks();
-	if(job_list) {
+	if (job_list) {
 		job_iterator = list_iterator_create(job_list);
 		while ((job_ptr = (struct job_record *)
 			list_next(job_iterator))) {
@@ -1293,7 +1293,7 @@ extern int sync_jobs(List job_list)
 		return SLURM_ERROR;
 	}
 	/* Insure that all other blocks are free of users */
-	if(block_list) {
+	if (block_list) {
 		_reset_block_list(block_list);
 		list_destroy(block_list);
 	} else {
@@ -1335,7 +1335,7 @@ extern int boot_block(bg_record_t *bg_record)
 	    != STATUS_OK) {
 		error("bridge_create_block(%s): %s",
 		      bg_record->bg_block_id, bg_err_str(rc));
-		if(rc == INCOMPATIBLE_STATE) {
+		if (rc == INCOMPATIBLE_STATE) {
 			char reason[200];
 			snprintf(reason, sizeof(reason),
 				 "boot_block: "
@@ -1360,7 +1360,7 @@ extern int boot_block(bg_record_t *bg_record)
 	*/
 	bg_record->boot_state = 1;
 #else
-	if(!block_ptr_exist_in_list(bg_lists->booted, bg_record))
+	if (!block_ptr_exist_in_list(bg_lists->booted, bg_record))
 		list_push(bg_lists->booted, bg_record);
 	bg_record->state = RM_PARTITION_READY;
 	last_bg_update = time(NULL);
diff --git a/src/plugins/select/bluegene/plugin/bg_record_functions.c b/src/plugins/select/bluegene/plugin/bg_record_functions.c
index 39de7dd1b3d4683dee0d10c62ee10c64fc32f16b..496f773bb0cca93363110f27c612e86801180f2d 100644
--- a/src/plugins/select/bluegene/plugin/bg_record_functions.c
+++ b/src/plugins/select/bluegene/plugin/bg_record_functions.c
@@ -98,7 +98,7 @@ extern void destroy_bg_record(void *object)
 		xfree(bg_record->ionodes);
 		xfree(bg_record->user_name);
 		xfree(bg_record->target_name);
-		if(bg_record->bg_block_list) {
+		if (bg_record->bg_block_list) {
 			list_destroy(bg_record->bg_block_list);
 			bg_record->bg_block_list = NULL;
 		}
@@ -126,10 +126,10 @@ extern int block_exist_in_list(List my_list, bg_record_t *bg_record)
 
 	while ((found_record = list_next(itr))) {
 		/* check for full node bitmap compare */
-		if(bit_equal(bg_record->bitmap, found_record->bitmap)
-		   && bit_equal(bg_record->ionode_bitmap,
-				found_record->ionode_bitmap)) {
-			if(bg_record->ionodes)
+		if (bit_equal(bg_record->bitmap, found_record->bitmap)
+		    && bit_equal(bg_record->ionode_bitmap,
+				 found_record->ionode_bitmap)) {
+			if (bg_record->ionodes)
 				debug("This block %s[%s] "
 				      "is already in the list %s",
 				      bg_record->nodes,
@@ -156,12 +156,12 @@ extern int block_ptr_exist_in_list(List my_list, bg_record_t *bg_record)
 	bg_record_t *found_record = NULL;
 	int rc = 0;
 
-	if(!my_list || !bg_record)
+	if (!my_list || !bg_record)
 		return rc;
 
 	itr = list_iterator_create(my_list);
 	while ((found_record = list_next(itr))) {
-		if(bg_record == found_record) {
+		if (bg_record == found_record) {
 			rc = 1;
 			break;
 		}
@@ -183,15 +183,15 @@ extern void process_nodes(bg_record_t *bg_record, bool startup)
 	ba_node_t* ba_node = NULL;
 	char *p = '\0';
 
-	if(!bg_record->bg_block_list
-	   || !list_count(bg_record->bg_block_list)) {
-		if(!bg_record->bg_block_list) {
+	if (!bg_record->bg_block_list
+	    || !list_count(bg_record->bg_block_list)) {
+		if (!bg_record->bg_block_list) {
 			bg_record->bg_block_list =
 				list_create(destroy_ba_node);
 		}
 		memset(&best_start, 0, sizeof(best_start));
 		bg_record->bp_count = 0;
-		if((bg_record->conn_type >= SELECT_SMALL) && (!startup))
+		if ((bg_record->conn_type >= SELECT_SMALL) && (!startup))
 			error("process_nodes: "
 			      "We shouldn't be here there could be some "
 			      "badness if we use this logic %s",
@@ -219,7 +219,7 @@ extern void process_nodes(bg_record_t *bg_record, bool startup)
 					HOSTLIST_BASE);
 				j += 3;
 				diff = end[X]-start[X];
-				if(diff > largest_diff) {
+				if (diff > largest_diff) {
 					best_start[X] = start[X];
 					best_start[Y] = start[Y];
 					best_start[Z] = start[Z];
@@ -234,13 +234,13 @@ extern void process_nodes(bg_record_t *bg_record, bool startup)
 					bg_record,
 					start,
 					end);
-				if(bg_record->nodes[j] != ',')
+				if (bg_record->nodes[j] != ',')
 					break;
 				j--;
-			} else if((bg_record->nodes[j] >= '0'
-				   && bg_record->nodes[j] <= '9')
-				  || (bg_record->nodes[j] >= 'A'
-				      && bg_record->nodes[j] <= 'Z')) {
+			} else if ((bg_record->nodes[j] >= '0'
+				    && bg_record->nodes[j] <= '9')
+				   || (bg_record->nodes[j] >= 'A'
+				       && bg_record->nodes[j] <= 'Z')) {
 
 				number = xstrntol(bg_record->nodes + j, &p,
 						  SYSTEM_DIMENSIONS,
@@ -250,7 +250,7 @@ extern void process_nodes(bg_record_t *bg_record, bool startup)
 					HOSTLIST_BASE);
 				j+=3;
 				diff = 0;
-				if(diff > largest_diff) {
+				if (diff > largest_diff) {
 					best_start[X] = start[X];
 					best_start[Y] = start[Y];
 					best_start[Z] = start[Z];
@@ -265,13 +265,13 @@ extern void process_nodes(bg_record_t *bg_record, bool startup)
 					bg_record,
 					start,
 					start);
-				if(bg_record->nodes[j] != ',')
+				if (bg_record->nodes[j] != ',')
 					break;
 				j--;
 			}
 			j++;
 		}
-		if(largest_diff == -1)
+		if (largest_diff == -1)
 			fatal("No hostnames given here");
 
 		bg_record->start[X] = best_start[X];
@@ -291,7 +291,7 @@ extern void process_nodes(bg_record_t *bg_record, bool startup)
 	end[X] = -1;
 	end[Y] = -1;
 	end[Z] = -1;
-	if(!start_set) {
+	if (!start_set) {
 		bg_record->start[X] = HOSTLIST_BASE;
 		bg_record->start[Y] = HOSTLIST_BASE;
 		bg_record->start[Z] = HOSTLIST_BASE;
@@ -301,7 +301,7 @@ extern void process_nodes(bg_record_t *bg_record, bool startup)
 
 	itr = list_iterator_create(bg_record->bg_block_list);
 	while ((ba_node = list_next(itr)) != NULL) {
-		if(!ba_node->used)
+		if (!ba_node->used)
 			continue;
 		debug4("process_nodes: "
 		       "%c%c%c is included in this block",
@@ -309,26 +309,26 @@ extern void process_nodes(bg_record_t *bg_record, bool startup)
 		       alpha_num[ba_node->coord[Y]],
 		       alpha_num[ba_node->coord[Z]]);
 
-		if(ba_node->coord[X]>end[X]) {
+		if (ba_node->coord[X]>end[X]) {
 			bg_record->geo[X]++;
 			end[X] = ba_node->coord[X];
 		}
-		if(ba_node->coord[Y]>end[Y]) {
+		if (ba_node->coord[Y]>end[Y]) {
 			bg_record->geo[Y]++;
 			end[Y] = ba_node->coord[Y];
 		}
-		if(ba_node->coord[Z]>end[Z]) {
+		if (ba_node->coord[Z]>end[Z]) {
 			bg_record->geo[Z]++;
 			end[Z] = ba_node->coord[Z];
 		}
-		if(!start_set) {
-			if(ba_node->coord[X]<bg_record->start[X]) {
+		if (!start_set) {
+			if (ba_node->coord[X]<bg_record->start[X]) {
 				bg_record->start[X] = ba_node->coord[X];
 			}
-			if(ba_node->coord[Y]<bg_record->start[Y]) {
+			if (ba_node->coord[Y]<bg_record->start[Y]) {
 				bg_record->start[Y] = ba_node->coord[Y];
 			}
-			if(ba_node->coord[Z]<bg_record->start[Z]) {
+			if (ba_node->coord[Z]<bg_record->start[Z]) {
 				bg_record->start[Z] = ba_node->coord[Z];
 			}
 		}
@@ -346,14 +346,14 @@ extern void process_nodes(bg_record_t *bg_record, bool startup)
 	/* This check is for sub midplane systems to figure out what
 	   the largest block can be.
 	*/
-	if((DIM_SIZE[X] > 1) || (DIM_SIZE[Y] > 1) || (DIM_SIZE[Z] > 1)) {
+	if ((DIM_SIZE[X] > 1) || (DIM_SIZE[Y] > 1) || (DIM_SIZE[Z] > 1)) {
 		/* means we have more than 1 base partition */
 		if ((bg_record->geo[X] == DIM_SIZE[X])
 		    && (bg_record->geo[Y] == DIM_SIZE[Y])
 		    && (bg_record->geo[Z] == DIM_SIZE[Z])) {
 			bg_record->full_block = 1;
 		}
-	} else if(bg_record->node_cnt == bg_conf->bp_node_cnt)
+	} else if (bg_record->node_cnt == bg_conf->bp_node_cnt)
 		bg_record->full_block = 1;
 
 	if (node_name2bitmap(bg_record->nodes,
@@ -378,7 +378,7 @@ extern List copy_bg_list(List in_list)
 	ListIterator itr = list_iterator_create(in_list);
 
 	while ((bg_record = (bg_record_t *) list_next(itr))) {
-		if(bg_record->magic != BLOCK_MAGIC) {
+		if (bg_record->magic != BLOCK_MAGIC) {
 			error("trying to copy a bad record");
 			continue;
 		}
@@ -399,7 +399,7 @@ extern void copy_bg_record(bg_record_t *fir_record, bg_record_t *sec_record)
 	ListIterator itr = NULL;
 	ba_node_t *ba_node = NULL, *new_ba_node = NULL;
 
-	if(!fir_record || !sec_record) {
+	if (!fir_record || !sec_record) {
 		error("copy_bg_record: "
 		      "given a null for either first record or second record");
 		return;
@@ -408,12 +408,12 @@ extern void copy_bg_record(bg_record_t *fir_record, bg_record_t *sec_record)
 	xfree(sec_record->bg_block_id);
 	sec_record->bg_block_id = xstrdup(fir_record->bg_block_id);
 
-	if(sec_record->bg_block_list)
+	if (sec_record->bg_block_list)
 		list_destroy(sec_record->bg_block_list);
 	sec_record->bg_block_list = list_create(destroy_ba_node);
-	if(fir_record->bg_block_list) {
+	if (fir_record->bg_block_list) {
 		itr = list_iterator_create(fir_record->bg_block_list);
-		while((ba_node = list_next(itr))) {
+		while ((ba_node = list_next(itr))) {
 			new_ba_node = ba_copy_node(ba_node);
 			list_append(sec_record->bg_block_list, new_ba_node);
 		}
@@ -421,8 +421,8 @@ extern void copy_bg_record(bg_record_t *fir_record, bg_record_t *sec_record)
 	}
 
 	FREE_NULL_BITMAP(sec_record->bitmap);
-	if(fir_record->bitmap
-	   && (sec_record->bitmap = bit_copy(fir_record->bitmap)) == NULL) {
+	if (fir_record->bitmap
+	    && (sec_record->bitmap = bit_copy(fir_record->bitmap)) == NULL) {
 		error("Unable to copy bitmap for %s", fir_record->nodes);
 		sec_record->bitmap = NULL;
 	}
@@ -449,9 +449,9 @@ extern void copy_bg_record(bg_record_t *fir_record, bg_record_t *sec_record)
 	sec_record->ionodes = xstrdup(fir_record->ionodes);
 
 	FREE_NULL_BITMAP(sec_record->ionode_bitmap);
-	if(fir_record->ionode_bitmap
-	   && (sec_record->ionode_bitmap
-	       = bit_copy(fir_record->ionode_bitmap)) == NULL) {
+	if (fir_record->ionode_bitmap
+	    && (sec_record->ionode_bitmap
+		= bit_copy(fir_record->ionode_bitmap)) == NULL) {
 		error("Unable to copy ionode_bitmap for %s",
 		      fir_record->nodes);
 		sec_record->ionode_bitmap = NULL;
@@ -511,15 +511,15 @@ extern int bg_record_cmpf_inc(bg_record_t* rec_a, bg_record_t* rec_b)
 
 	/* We only look at this if we are ordering blocks larger than
 	 * a midplane, order of ionodes is how we order otherwise. */
-	if((size_a >= bg_conf->bp_node_cnt)
-	   || (size_b >= bg_conf->bp_node_cnt)) {
+	if ((size_a >= bg_conf->bp_node_cnt)
+	    || (size_b >= bg_conf->bp_node_cnt)) {
 		if (size_a < size_b)
 			return -1;
 		else if (size_a > size_b)
 			return 1;
 	}
 
-	if(rec_a->nodes && rec_b->nodes) {
+	if (rec_a->nodes && rec_b->nodes) {
 		size_a = strcmp(rec_a->nodes, rec_b->nodes);
 		if (size_a < 0)
 			return -1;
@@ -527,10 +527,10 @@ extern int bg_record_cmpf_inc(bg_record_t* rec_a, bg_record_t* rec_b)
 			return 1;
 	}
 
-	if(!rec_a->ionode_bitmap || !rec_b->ionode_bitmap)
+	if (!rec_a->ionode_bitmap || !rec_b->ionode_bitmap)
 		return 0;
 
-	if(bit_ffs(rec_a->ionode_bitmap) < bit_ffs(rec_b->ionode_bitmap))
+	if (bit_ffs(rec_a->ionode_bitmap) < bit_ffs(rec_b->ionode_bitmap))
 		return -1;
 	else
 		return 1;
@@ -546,20 +546,20 @@ extern int bg_record_cmpf_inc(bg_record_t* rec_a, bg_record_t* rec_b)
  */
 extern int bg_record_sort_aval_inc(bg_record_t* rec_a, bg_record_t* rec_b)
 {
-	if((rec_a->job_running == BLOCK_ERROR_STATE)
-	   && (rec_b->job_running != BLOCK_ERROR_STATE))
+	if ((rec_a->job_running == BLOCK_ERROR_STATE)
+	    && (rec_b->job_running != BLOCK_ERROR_STATE))
 		return 1;
-	else if((rec_a->job_running != BLOCK_ERROR_STATE)
-		&& (rec_b->job_running == BLOCK_ERROR_STATE))
+	else if ((rec_a->job_running != BLOCK_ERROR_STATE)
+		 && (rec_b->job_running == BLOCK_ERROR_STATE))
 		return -1;
-	else if(!rec_a->job_ptr && rec_b->job_ptr)
+	else if (!rec_a->job_ptr && rec_b->job_ptr)
 		return -1;
-	else if(rec_a->job_ptr && !rec_b->job_ptr)
+	else if (rec_a->job_ptr && !rec_b->job_ptr)
 		return 1;
-	else if(rec_a->job_ptr && rec_b->job_ptr) {
-		if(rec_a->job_ptr->end_time > rec_b->job_ptr->end_time)
+	else if (rec_a->job_ptr && rec_b->job_ptr) {
+		if (rec_a->job_ptr->end_time > rec_b->job_ptr->end_time)
 			return 1;
-		else if(rec_a->job_ptr->end_time < rec_b->job_ptr->end_time)
+		else if (rec_a->job_ptr->end_time < rec_b->job_ptr->end_time)
 			return -1;
 	}
 
@@ -576,18 +576,18 @@ extern bg_record_t *find_bg_record_in_list(List my_list, char *bg_block_id)
 
 	xassert(my_list);
 
-	if(!bg_block_id)
+	if (!bg_block_id)
 		return NULL;
 
 	itr = list_iterator_create(my_list);
-	while((bg_record = list_next(itr))) {
-		if(bg_record->bg_block_id)
+	while ((bg_record = list_next(itr))) {
+		if (bg_record->bg_block_id)
 			if (!strcasecmp(bg_record->bg_block_id, bg_block_id))
 				break;
 	}
 	list_iterator_destroy(itr);
 
-	if(bg_record)
+	if (bg_record)
 		return bg_record;
 	else
 		return NULL;
@@ -600,20 +600,20 @@ extern bg_record_t *find_bg_record_in_list(List my_list, char *bg_block_id)
 */
 extern int update_block_user(bg_record_t *bg_record, int set)
 {
-	if(!bg_record->target_name) {
+	if (!bg_record->target_name) {
 		error("Must set target_name to run update_block_user.");
 		return -1;
 	}
-	if(!bg_record->user_name) {
+	if (!bg_record->user_name) {
 		error("No user_name");
 		bg_record->user_name = xstrdup(bg_conf->slurm_user_name);
 	}
 #ifdef HAVE_BG_FILES
 	int rc=0;
-	if(set) {
-		if((rc = remove_all_users(bg_record->bg_block_id,
-					  bg_record->target_name))
-		   == REMOVE_USER_ERR) {
+	if (set) {
+		if ((rc = remove_all_users(bg_record->bg_block_id,
+					   bg_record->target_name))
+		    == REMOVE_USER_ERR) {
 			error("1 Something happened removing "
 			      "users from block %s",
 			      bg_record->bg_block_id);
@@ -641,7 +641,7 @@ extern int update_block_user(bg_record_t *bg_record, int set)
 	}
 #endif
 
-	if(strcmp(bg_record->target_name, bg_record->user_name)) {
+	if (strcmp(bg_record->target_name, bg_record->user_name)) {
 		uid_t pw_uid;
 		xfree(bg_record->user_name);
 		bg_record->user_name = xstrdup(bg_record->target_name);
@@ -669,7 +669,7 @@ extern void requeue_and_error(bg_record_t *bg_record, char *reason)
 		return;
 	}
 
-	if(bg_record->job_running > NO_JOB_RUNNING)
+	if (bg_record->job_running > NO_JOB_RUNNING)
 		bg_requeue_job(bg_record->job_running, 0);
 
 	slurm_mutex_lock(&block_state_mutex);
@@ -697,7 +697,7 @@ extern int add_bg_record(List records, List used_nodes, blockreq_t *blockreq,
 
 	xassert(bg_conf->slurm_user_name);
 
-	if(!records) {
+	if (!records) {
 		fatal("add_bg_record: no records list given");
 	}
 	bg_record = (bg_record_t*) xmalloc(sizeof(bg_record_t));
@@ -713,9 +713,9 @@ extern int add_bg_record(List records, List used_nodes, blockreq_t *blockreq,
 		bg_record->user_uid = pw_uid;
 
 	bg_record->bg_block_list = list_create(destroy_ba_node);
-	if(used_nodes) {
-		if(copy_node_path(used_nodes, &bg_record->bg_block_list)
-		   == SLURM_ERROR)
+	if (used_nodes) {
+		if (copy_node_path(used_nodes, &bg_record->bg_block_list)
+		    == SLURM_ERROR)
 			error("add_bg_record: "
 			      "couldn't copy the path for the allocation");
 		bg_record->bp_count = list_count(used_nodes);
@@ -723,12 +723,12 @@ extern int add_bg_record(List records, List used_nodes, blockreq_t *blockreq,
 	/* bg_record->boot_state = 0; 	Implicit */
 	/* bg_record->state = 0;	Implicit */
 #ifdef HAVE_BGL
-	if(bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
+	if (bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
 		info("add_bg_record: asking for %s %d %d %s",
 		     blockreq->block, blockreq->small32, blockreq->small128,
 		     conn_type_string(blockreq->conn_type));
 #else
-	if(bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
+	if (bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
 		info("add_bg_record: asking for %s %d %d %d %d %d %s",
 		     blockreq->block, blockreq->small256,
 		     blockreq->small128, blockreq->small64,
@@ -742,13 +742,13 @@ extern int add_bg_record(List records, List used_nodes, blockreq_t *blockreq,
 
 	len = strlen(blockreq->block);
 	i=0;
-	while(i<len
-	      && blockreq->block[i] != '['
-	      && (blockreq->block[i] < '0' || blockreq->block[i] > 'Z'
-		  || (blockreq->block[i] > '9' && blockreq->block[i] < 'A')))
+	while (i<len
+	       && blockreq->block[i] != '['
+	       && (blockreq->block[i] < '0' || blockreq->block[i] > 'Z'
+		   || (blockreq->block[i] > '9' && blockreq->block[i] < 'A')))
 		i++;
 
-	if(i<len) {
+	if (i<len) {
 		len -= i;
 
 		len += strlen(bg_conf->slurm_node_prefix)+1;
@@ -770,35 +770,35 @@ extern int add_bg_record(List records, List used_nodes, blockreq_t *blockreq,
 	bg_record->job_running = NO_JOB_RUNNING;
 
 #ifdef HAVE_BGL
-	if(blockreq->blrtsimage)
+	if (blockreq->blrtsimage)
 		bg_record->blrtsimage = xstrdup(blockreq->blrtsimage);
 	else
 		bg_record->blrtsimage = xstrdup(bg_conf->default_blrtsimage);
 #endif
-	if(blockreq->linuximage)
+	if (blockreq->linuximage)
 		bg_record->linuximage = xstrdup(blockreq->linuximage);
 	else
 		bg_record->linuximage = xstrdup(bg_conf->default_linuximage);
 
-	if(blockreq->mloaderimage)
+	if (blockreq->mloaderimage)
 		bg_record->mloaderimage = xstrdup(blockreq->mloaderimage);
 	else
 		bg_record->mloaderimage =
 			xstrdup(bg_conf->default_mloaderimage);
 
-	if(blockreq->ramdiskimage)
+	if (blockreq->ramdiskimage)
 		bg_record->ramdiskimage = xstrdup(blockreq->ramdiskimage);
 	else
 		bg_record->ramdiskimage =
 			xstrdup(bg_conf->default_ramdiskimage);
 
-	if(bg_record->conn_type != SELECT_SMALL) {
+	if (bg_record->conn_type != SELECT_SMALL) {
 		/* this needs to be an append so we keep things in the
 		   order we got them, they will be sorted later */
 		list_append(records, bg_record);
 		/* this isn't a correct list so we need to set it later for
 		   now we just used it to be the bp number */
-		if(!used_nodes) {
+		if (!used_nodes) {
 			debug4("add_bg_record: "
 			       "we didn't get a request list so we are "
 			       "destroying this bp list");
@@ -808,15 +808,15 @@ extern int add_bg_record(List records, List used_nodes, blockreq_t *blockreq,
 	} else {
 		List bg_block_list = NULL;
 
-		if(bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
+		if (bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
 			info("add_bg_record: adding a small block");
-		if(no_check)
+		if (no_check)
 			goto no_check;
 		/* if the ionode cnt for small32 is 0 then don't
 		   allow a sub quarter allocation
 		*/
-		if(bg_conf->nodecard_ionode_cnt < 2) {
-			if(!bg_conf->nodecard_ionode_cnt && blockreq->small32)
+		if (bg_conf->nodecard_ionode_cnt < 2) {
+			if (!bg_conf->nodecard_ionode_cnt && blockreq->small32)
 				fatal("add_bg_record: "
 				      "There is an error in your "
 				      "bluegene.conf file.\n"
@@ -825,7 +825,7 @@ extern int add_bg_record(List records, List used_nodes, blockreq_t *blockreq,
 				      "to at least 16)",
 				      bg_conf->numpsets);
 #ifndef HAVE_BGL
-			if(blockreq->small16)
+			if (blockreq->small16)
 				fatal("add_bg_record: "
 				      "There is an error in your "
 				      "bluegene.conf file.\n"
@@ -833,7 +833,7 @@ extern int add_bg_record(List records, List used_nodes, blockreq_t *blockreq,
 				      "Numpsets=%u. (Try setting it to "
 				      "at least 32)",
 				      bg_conf->numpsets);
-			if((bg_conf->io_ratio < 0.5) && blockreq->small64)
+			if ((bg_conf->io_ratio < 0.5) && blockreq->small64)
 				fatal("add_bg_record: "
 				      "There is an error in your "
 				      "bluegene.conf file.\n"
@@ -845,7 +845,7 @@ extern int add_bg_record(List records, List used_nodes, blockreq_t *blockreq,
 		}
 
 #ifdef HAVE_BGL
-		if(blockreq->small32==0 && blockreq->small128==0) {
+		if (blockreq->small32==0 && blockreq->small128==0) {
 			info("add_bg_record: "
 			     "No specs given for this small block, "
 			     "I am spliting this block into 4 128CnBlocks");
@@ -854,7 +854,7 @@ extern int add_bg_record(List records, List used_nodes, blockreq_t *blockreq,
 
 		i = (blockreq->small32*bg_conf->nodecard_node_cnt) +
 			(blockreq->small128*bg_conf->quarter_node_cnt);
-		if(i != bg_conf->bp_node_cnt)
+		if (i != bg_conf->bp_node_cnt)
 			fatal("add_bg_record: "
 			      "There is an error in your bluegene.conf file.\n"
 			      "I am unable to request %d nodes consisting of "
@@ -864,9 +864,9 @@ extern int add_bg_record(List records, List used_nodes, blockreq_t *blockreq,
 			      bg_conf->bp_node_cnt);
 		small_count = blockreq->small32+blockreq->small128;
 #else
-		if(!blockreq->small16 && !blockreq->small32
-		   && !blockreq->small64 && !blockreq->small128
-		   && !blockreq->small256) {
+		if (!blockreq->small16 && !blockreq->small32
+		    && !blockreq->small64 && !blockreq->small128
+		    && !blockreq->small256) {
 			info("add_bg_record: "
 			     "No specs given for this small block, "
 			     "I am spliting this block into 2 256CnBlocks");
@@ -878,7 +878,7 @@ extern int add_bg_record(List records, List used_nodes, blockreq_t *blockreq,
 			+ (blockreq->small64*64)
 			+ (blockreq->small128*128)
 			+ (blockreq->small256*256);
-		if(i != bg_conf->bp_node_cnt)
+		if (i != bg_conf->bp_node_cnt)
 			fatal("add_bg_record: "
 			      "There is an error in your bluegene.conf file.\n"
 			      "I am unable to request %d nodes consisting of "
@@ -951,7 +951,7 @@ extern int handle_small_record_request(List records, blockreq_t *blockreq,
 		start++;
 	}
 #endif
-	if((ionode_cnt = bg_conf->nodecard_ionode_cnt))
+	if ((ionode_cnt = bg_conf->nodecard_ionode_cnt))
 		ionode_cnt--;
 	for(i=0; i<blockreq->small32; i++) {
 		bit_nset(ionodes, start, start+ionode_cnt);
@@ -965,7 +965,7 @@ extern int handle_small_record_request(List records, blockreq_t *blockreq,
 	}
 
 #ifndef HAVE_BGL
-	if((ionode_cnt = bg_conf->nodecard_ionode_cnt * 2))
+	if ((ionode_cnt = bg_conf->nodecard_ionode_cnt * 2))
 		ionode_cnt--;
 	for(i=0; i<blockreq->small64; i++) {
 		bit_nset(ionodes, start, start+ionode_cnt);
@@ -978,7 +978,7 @@ extern int handle_small_record_request(List records, blockreq_t *blockreq,
 		start+=ionode_cnt+1;
 	}
 #endif
-	if((ionode_cnt = bg_conf->quarter_ionode_cnt))
+	if ((ionode_cnt = bg_conf->quarter_ionode_cnt))
 		ionode_cnt--;
 	for(i=0; i<blockreq->small128; i++) {
 		bit_nset(ionodes, start, start+ionode_cnt);
@@ -992,7 +992,7 @@ extern int handle_small_record_request(List records, blockreq_t *blockreq,
 	}
 
 #ifndef HAVE_BGL
-	if((ionode_cnt = bg_conf->quarter_ionode_cnt * 2))
+	if ((ionode_cnt = bg_conf->quarter_ionode_cnt * 2))
 		ionode_cnt--;
 	for(i=0; i<blockreq->small256; i++) {
 		bit_nset(ionodes, start, start+ionode_cnt);
@@ -1014,7 +1014,7 @@ extern int handle_small_record_request(List records, blockreq_t *blockreq,
 
 extern int format_node_name(bg_record_t *bg_record, char *buf, int buf_size)
 {
-	if(bg_record->ionodes) {
+	if (bg_record->ionodes) {
 		snprintf(buf, buf_size, "%s[%s]",
 			 bg_record->nodes,
 			 bg_record->ionodes);
@@ -1047,15 +1047,15 @@ extern int down_nodecard(char *bp_name, bitoff_t io_start,
 
 	xassert(bp_name);
 
-	if(io_cnt == NO_VAL) {
+	if (io_cnt == NO_VAL) {
 		io_cnt = 1;
 		/* Translate 1 nodecard count to ionode count */
-		if((io_cnt *= bg_conf->io_ratio))
+		if ((io_cnt *= bg_conf->io_ratio))
 			io_cnt--;
 
 		/* make sure we create something that is able to be
 		   created */
-		if(bg_conf->smallest_block < bg_conf->nodecard_node_cnt)
+		if (bg_conf->smallest_block < bg_conf->nodecard_node_cnt)
 			create_size = bg_conf->nodecard_node_cnt;
 		else
 			create_size = bg_conf->smallest_block;
@@ -1070,8 +1070,8 @@ extern int down_nodecard(char *bp_name, bitoff_t io_start,
 
 	/* this is here for sanity check to make sure we don't core on
 	   these bits when we set them below. */
-	if(io_start >= bg_conf->numpsets
-	   || (io_start+io_cnt) >= bg_conf->numpsets) {
+	if (io_start >= bg_conf->numpsets
+	    || (io_start+io_cnt) >= bg_conf->numpsets) {
 		debug("io %d-%d not configured on this "
 		      "system, only %d ionodes per midplane",
 		      io_start, io_start+io_cnt, bg_conf->numpsets);
@@ -1100,14 +1100,14 @@ extern int down_nodecard(char *bp_name, bitoff_t io_start,
 	slurm_mutex_lock(&block_state_mutex);
 	itr = list_iterator_create(bg_lists->main);
 	while ((bg_record = list_next(itr))) {
-		if(!bit_test(bg_record->bitmap, bp_bit))
+		if (!bit_test(bg_record->bitmap, bp_bit))
 			continue;
 
-		if(!blocks_overlap(bg_record, &tmp_record))
+		if (!blocks_overlap(bg_record, &tmp_record))
 			continue;
 
-		if(bg_record->job_running > NO_JOB_RUNNING) {
-			if(slurmctld_locked)
+		if (bg_record->job_running > NO_JOB_RUNNING) {
+			if (slurmctld_locked)
 				job_fail(bg_record->job_running);
 			else
 				slurm_fail_job(bg_record->job_running);
@@ -1116,9 +1116,9 @@ extern int down_nodecard(char *bp_name, bitoff_t io_start,
 		/* If Running Dynamic mode and the the block is
 		   smaller than the create size just continue on.
 		*/
-		if((bg_conf->layout_mode == LAYOUT_DYNAMIC)
-		   && (bg_record->node_cnt < create_size)) {
-			if(!delete_list)
+		if ((bg_conf->layout_mode == LAYOUT_DYNAMIC)
+		    && (bg_record->node_cnt < create_size)) {
+			if (!delete_list)
 				delete_list = list_create(NULL);
 			list_append(delete_list, bg_record);
 			continue;
@@ -1126,26 +1126,26 @@ extern int down_nodecard(char *bp_name, bitoff_t io_start,
 
 		/* keep track of the smallest size that is at least
 		   the size of create_size. */
-		if(!smallest_bg_record ||
-		   (smallest_bg_record->node_cnt > bg_record->node_cnt))
+		if (!smallest_bg_record ||
+		    (smallest_bg_record->node_cnt > bg_record->node_cnt))
 			smallest_bg_record = bg_record;
 	}
 	list_iterator_destroy(itr);
 	slurm_mutex_unlock(&block_state_mutex);
 
-	if(bg_conf->layout_mode != LAYOUT_DYNAMIC) {
+	if (bg_conf->layout_mode != LAYOUT_DYNAMIC) {
 		debug3("running non-dynamic mode");
 		/* This should never happen, but just in case... */
-		if(delete_list)
+		if (delete_list)
 			list_destroy(delete_list);
 
 		/* If we found a block that is smaller or equal to a
 		   midplane we will just mark it in an error state as
 		   opposed to draining the node.
 		*/
-		if(smallest_bg_record
-		   && (smallest_bg_record->node_cnt < bg_conf->bp_node_cnt)){
-			if(smallest_bg_record->state == RM_PARTITION_ERROR) {
+		if (smallest_bg_record
+		    && (smallest_bg_record->node_cnt < bg_conf->bp_node_cnt)){
+			if (smallest_bg_record->state == RM_PARTITION_ERROR) {
 				rc = SLURM_NO_CHANGE_IN_DATA;
 				goto cleanup;
 			}
@@ -1157,8 +1157,8 @@ extern int down_nodecard(char *bp_name, bitoff_t io_start,
 
 		debug("No block under 1 midplane available for this nodecard.  "
 		      "Draining the whole node.");
-		if(!node_already_down(bp_name)) {
-			if(slurmctld_locked)
+		if (!node_already_down(bp_name)) {
+			if (slurmctld_locked)
 				drain_nodes(bp_name, reason,
 					    slurm_get_slurm_user_id());
 			else
@@ -1171,7 +1171,7 @@ extern int down_nodecard(char *bp_name, bitoff_t io_start,
 
 	/* below is only for Dynamic mode */
 
-	if(delete_list) {
+	if (delete_list) {
 		int cnt_set = 0;
 		bitstr_t *iobitmap = bit_alloc(bg_conf->numpsets);
 		/* don't lock here since it is handled inside
@@ -1182,7 +1182,7 @@ extern int down_nodecard(char *bp_name, bitoff_t io_start,
 			debug2("combining smaller than nodecard "
 			       "dynamic block %s",
 			       bg_record->bg_block_id);
-			while(bg_record->job_running > NO_JOB_RUNNING)
+			while (bg_record->job_running > NO_JOB_RUNNING)
 				sleep(1);
 
 			bit_or(iobitmap, bg_record->ionode_bitmap);
@@ -1190,7 +1190,7 @@ extern int down_nodecard(char *bp_name, bitoff_t io_start,
 		}
 		list_iterator_destroy(itr);
 		list_destroy(delete_list);
-		if(!cnt_set) {
+		if (!cnt_set) {
 			FREE_NULL_BITMAP(iobitmap);
 			rc = SLURM_ERROR;
 			goto cleanup;
@@ -1198,37 +1198,37 @@ extern int down_nodecard(char *bp_name, bitoff_t io_start,
 		/* set the start to be the same as the start of the
 		   ionode_bitmap.  If no ionodes set (not a small
 		   block) set io_start = 0. */
-		if((io_start = bit_ffs(iobitmap)) == -1) {
+		if ((io_start = bit_ffs(iobitmap)) == -1) {
 			io_start = 0;
-			if(create_size > bg_conf->nodecard_node_cnt)
+			if (create_size > bg_conf->nodecard_node_cnt)
 				blockreq.small128 = 4;
 			else
 				blockreq.small32 = 16;
-		} else if(create_size <= bg_conf->nodecard_node_cnt)
+		} else if (create_size <= bg_conf->nodecard_node_cnt)
 			blockreq.small32 = 1;
 		else
 			/* this should never happen */
 			blockreq.small128 = 1;
 
 		FREE_NULL_BITMAP(iobitmap);
-	} else if(smallest_bg_record) {
+	} else if (smallest_bg_record) {
 		debug2("smallest dynamic block is %s",
 		       smallest_bg_record->bg_block_id);
-		if(smallest_bg_record->state == RM_PARTITION_ERROR) {
+		if (smallest_bg_record->state == RM_PARTITION_ERROR) {
 			rc = SLURM_NO_CHANGE_IN_DATA;
 			goto cleanup;
 		}
 
-		while(smallest_bg_record->job_running > NO_JOB_RUNNING)
+		while (smallest_bg_record->job_running > NO_JOB_RUNNING)
 			sleep(1);
 
-		if(smallest_bg_record->node_cnt == create_size) {
+		if (smallest_bg_record->node_cnt == create_size) {
 			rc = put_block_in_error_state(
 				smallest_bg_record, BLOCK_ERROR_STATE, reason);
 			goto cleanup;
 		}
 
-		if(create_size > smallest_bg_record->node_cnt) {
+		if (create_size > smallest_bg_record->node_cnt) {
 			/* we should never get here.  This means we
 			 * have a create_size that is bigger than a
 			 * block that is already made.
@@ -1256,12 +1256,12 @@ extern int down_nodecard(char *bp_name, bitoff_t io_start,
 			break;
 		}
 
-		if(create_size != bg_conf->nodecard_node_cnt) {
+		if (create_size != bg_conf->nodecard_node_cnt) {
 			blockreq.small128 = blockreq.small32 / 4;
 			blockreq.small32 = 0;
 			io_start = 0;
-		} else if((io_start =
-			   bit_ffs(smallest_bg_record->ionode_bitmap)) == -1)
+		} else if ((io_start =
+			    bit_ffs(smallest_bg_record->ionode_bitmap)) == -1)
 			/* set the start to be the same as the start of the
 			   ionode_bitmap.  If no ionodes set (not a small
 			   block) set io_start = 0. */
@@ -1282,9 +1282,9 @@ extern int down_nodecard(char *bp_name, bitoff_t io_start,
 			blockreq.small128 = 4;
 			break;
 		case 512:
-			if(!node_already_down(bp_name)) {
+			if (!node_already_down(bp_name)) {
 				char *reason = "select_bluegene: nodecard down";
-				if(slurmctld_locked)
+				if (slurmctld_locked)
 					drain_nodes(bp_name, reason,
 						    slurm_get_slurm_user_id());
 				else
@@ -1316,10 +1316,10 @@ extern int down_nodecard(char *bp_name, bitoff_t io_start,
 
 	slurm_mutex_lock(&block_state_mutex);
 	delete_list = list_create(NULL);
-	while((bg_record = list_pop(requests))) {
+	while ((bg_record = list_pop(requests))) {
 		itr = list_iterator_create(bg_lists->main);
-		while((found_record = list_next(itr))) {
-			if(!blocks_overlap(bg_record, found_record))
+		while ((found_record = list_next(itr))) {
+			if (!blocks_overlap(bg_record, found_record))
 				continue;
 			list_push(delete_list, found_record);
 			list_remove(itr);
@@ -1327,7 +1327,7 @@ extern int down_nodecard(char *bp_name, bitoff_t io_start,
 		list_iterator_destroy(itr);
 
 		/* we need to add this record since it doesn't exist */
-		if(configure_block(bg_record) == SLURM_ERROR) {
+		if (configure_block(bg_record) == SLURM_ERROR) {
 			destroy_bg_record(bg_record);
 			error("down_sub_node_blocks: "
 			      "unable to configure block in api");
@@ -1339,8 +1339,8 @@ extern int down_nodecard(char *bp_name, bitoff_t io_start,
 		      bg_record->bg_block_id);
 		print_bg_record(bg_record);
 		list_append(bg_lists->main, bg_record);
-		if(bit_overlap(bg_record->ionode_bitmap,
-			       tmp_record.ionode_bitmap)) {
+		if (bit_overlap(bg_record->ionode_bitmap,
+				tmp_record.ionode_bitmap)) {
 			/* here we know the error block doesn't exist
 			   so just set the state here */
 			slurm_mutex_unlock(&block_state_mutex);
@@ -1390,13 +1390,13 @@ extern int up_nodecard(char *bp_name, bitstr_t *ionode_bitmap)
 
 	slurm_mutex_lock(&block_state_mutex);
 	itr = list_iterator_create(bg_lists->main);
-	while((bg_record = list_next(itr))) {
-		if(bg_record->job_running != BLOCK_ERROR_STATE)
+	while ((bg_record = list_next(itr))) {
+		if (bg_record->job_running != BLOCK_ERROR_STATE)
 			continue;
-		if(!bit_test(bg_record->bitmap, bp_bit))
+		if (!bit_test(bg_record->bitmap, bp_bit))
 			continue;
 
-		if(!bit_overlap(bg_record->ionode_bitmap, ionode_bitmap)) {
+		if (!bit_overlap(bg_record->ionode_bitmap, ionode_bitmap)) {
 			continue;
 		}
 		resume_block(bg_record);
@@ -1407,9 +1407,9 @@ extern int up_nodecard(char *bp_name, bitstr_t *ionode_bitmap)
 	/* FIX ME: This needs to call the opposite of
 	   slurm_drain_nodes which does not yet exist.
 	*/
-	if((ret = node_already_down(bp_name))) {
+	if ((ret = node_already_down(bp_name))) {
 		/* means it was drained */
-		if(ret == 2) {
+		if (ret == 2) {
 			/* debug("node %s put back into service after " */
 /* 			      "being in an error state", */
 /* 			      bp_name); */
@@ -1430,13 +1430,13 @@ extern int put_block_in_error_state(bg_record_t *bg_record,
 	/* Only check this if the blocks are created, meaning this
 	   isn't at startup.
 	*/
-	if(blocks_are_created) {
+	if (blocks_are_created) {
 		/* Since we are putting this block in an error state we need
 		   to wait for the job to be removed.  We don't really
 		   need to free the block though since we may just
 		   want it to be in an error state for some reason. */
-		while(bg_record->job_running > NO_JOB_RUNNING) {
-			if(bg_record->magic != BLOCK_MAGIC) {
+		while (bg_record->job_running > NO_JOB_RUNNING) {
+			if (bg_record->magic != BLOCK_MAGIC) {
 				error("While putting block %s in a error "
 				      "state it was destroyed",
 				      bg_record->bg_block_id);
@@ -1449,7 +1449,7 @@ extern int put_block_in_error_state(bg_record_t *bg_record,
 	}
 
 	slurm_mutex_lock(&block_state_mutex);
-	if(!block_ptr_exist_in_list(bg_lists->main, bg_record)) {
+	if (!block_ptr_exist_in_list(bg_lists->main, bg_record)) {
 		slurm_mutex_unlock(&block_state_mutex);
 		error("while trying to put block in "
 		      "error state it disappeared");
@@ -1460,11 +1460,11 @@ extern int put_block_in_error_state(bg_record_t *bg_record,
 	     bg_record->bg_block_id, reason);
 	/* we add the block to these lists so we don't try to schedule
 	   on them. */
-	if(!block_ptr_exist_in_list(bg_lists->job_running, bg_record)) {
+	if (!block_ptr_exist_in_list(bg_lists->job_running, bg_record)) {
 		list_push(bg_lists->job_running, bg_record);
 		num_unused_cpus -= bg_record->cpu_cnt;
 	}
-	if(!block_ptr_exist_in_list(bg_lists->booted, bg_record))
+	if (!block_ptr_exist_in_list(bg_lists->booted, bg_record))
 		list_push(bg_lists->booted, bg_record);
 
 	bg_record->job_running = state;
@@ -1483,7 +1483,7 @@ extern int put_block_in_error_state(bg_record_t *bg_record,
 
 	/* Only send if reason is set.  If it isn't set then
 	   accounting should already know about this error state */
-	if(reason)
+	if (reason)
 		_set_block_nodes_accounting(bg_record, reason);
 	slurm_mutex_unlock(&block_state_mutex);
 
@@ -1496,18 +1496,18 @@ extern int resume_block(bg_record_t *bg_record)
 {
 	xassert(bg_record);
 
-	if(bg_record->job_running > NO_JOB_RUNNING)
+	if (bg_record->job_running > NO_JOB_RUNNING)
 		return SLURM_SUCCESS;
 
-	if(bg_record->state == RM_PARTITION_ERROR)
+	if (bg_record->state == RM_PARTITION_ERROR)
 		info("Block %s put back into service after "
 		     "being in an error state.",
 		     bg_record->bg_block_id);
 
-	if(remove_from_bg_list(bg_lists->job_running, bg_record)
-	   == SLURM_SUCCESS)
+	if (remove_from_bg_list(bg_lists->job_running, bg_record)
+	    == SLURM_SUCCESS)
 		num_unused_cpus += bg_record->cpu_cnt;
-	if(bg_record->state != RM_PARTITION_READY)
+	if (bg_record->state != RM_PARTITION_READY)
 		remove_from_bg_list(bg_lists->booted, bg_record);
 
 	bg_record->job_running = NO_JOB_RUNNING;
@@ -1540,7 +1540,7 @@ static int _check_all_blocks_error(int node_inx, time_t event_time,
 
 	/* only do this if the node isn't in the DRAINED state.
 	   DRAINING is ok */
-	if(IS_NODE_DRAINED(node_ptr))
+	if (IS_NODE_DRAINED(node_ptr))
 		return rc;
 
 	memset(&send_node, 0, sizeof(struct node_record));
@@ -1551,13 +1551,13 @@ static int _check_all_blocks_error(int node_inx, time_t event_time,
 	/* here we need to check if there are any other blocks on this
 	   midplane and adjust things correctly */
 	itr = list_iterator_create(bg_lists->main);
-	while((bg_record = list_next(itr))) {
+	while ((bg_record = list_next(itr))) {
 		/* only look at other nodes in error state */
-		if(bg_record->state != RM_PARTITION_ERROR)
+		if (bg_record->state != RM_PARTITION_ERROR)
 			continue;
-		if(!bit_test(bg_record->bitmap, node_inx))
+		if (!bit_test(bg_record->bitmap, node_inx))
 			continue;
-		if(bg_record->cpu_cnt >= bg_conf->cpus_per_bp) {
+		if (bg_record->cpu_cnt >= bg_conf->cpus_per_bp) {
 			total_cpus = bg_conf->cpus_per_bp;
 			break;
 		} else
@@ -1568,10 +1568,10 @@ static int _check_all_blocks_error(int node_inx, time_t event_time,
 	send_node.cpus = total_cpus;
 	config_rec.cpus = total_cpus;
 
-	if(send_node.cpus) {
-		if(!reason)
+	if (send_node.cpus) {
+		if (!reason)
 			reason = "update block: setting partial node down.";
-		if(!node_ptr->reason)
+		if (!node_ptr->reason)
 			node_ptr->reason = xstrdup(reason);
 		node_ptr->reason_time = event_time;
 		node_ptr->reason_uid = slurm_get_slurm_user_id();
@@ -1582,7 +1582,7 @@ static int _check_all_blocks_error(int node_inx, time_t event_time,
 						     reason,
 						     node_ptr->reason_uid);
 	} else {
-		if(node_ptr->reason)
+		if (node_ptr->reason)
 			xfree(node_ptr->reason);
 		node_ptr->reason_time = 0;
 		node_ptr->reason_uid = NO_VAL;
@@ -1606,7 +1606,7 @@ static int _set_block_nodes_accounting(bg_record_t *bg_record, char *reason)
 	int i = 0;
 
 	for(i = 0; i < node_record_count; i++) {
-		if(!bit_test(bg_record->bitmap, i))
+		if (!bit_test(bg_record->bitmap, i))
 			continue;
 		rc = _check_all_blocks_error(i, now, reason);
 	}
diff --git a/src/plugins/select/bluegene/plugin/bg_switch_connections.c b/src/plugins/select/bluegene/plugin/bg_switch_connections.c
index bd8c979ce2188596d5ef2bcc6b2e36fcead3bcd4..50c40e32731186ba84f8f639d0795f82bc99a545 100644
--- a/src/plugins/select/bluegene/plugin/bg_switch_connections.c
+++ b/src/plugins/select/bluegene/plugin/bg_switch_connections.c
@@ -67,7 +67,7 @@ static int _get_bp_by_location(my_bluegene_t* my_bg, uint16_t* curr_coord,
 	int i, rc;
 	rm_location_t loc;
 
-	if(!bp_num) {
+	if (!bp_num) {
 		if ((rc = bridge_get_data(my_bg, RM_BPNum, &bp_num))
 		    != STATUS_OK) {
 			fatal("bridge_get_data: RM_BPNum: %s", bg_err_str(rc));
@@ -76,7 +76,7 @@ static int _get_bp_by_location(my_bluegene_t* my_bg, uint16_t* curr_coord,
 	}
 
 	for (i=0; i<bp_num; i++){
-		if(i) {
+		if (i) {
 			if ((rc = bridge_get_data(my_bg, RM_NextBP, bp))
 			    != STATUS_OK) {
 				fatal("bridge_get_data: RM_NextBP: %s",
@@ -117,7 +117,7 @@ static int _get_switches_by_bpid(
 	int found_bpid = 0;
 	char *curr_bpid = NULL;
 
-	if(!switch_num) {
+	if (!switch_num) {
 		if ((rc = bridge_get_data(my_bg, RM_SwitchNum, &switch_num))
 		    != STATUS_OK) {
 			fatal("bridge_get_data: RM_SwitchNum: %s",
@@ -127,7 +127,7 @@ static int _get_switches_by_bpid(
 	}
 
 	for (i=0; i<switch_num; i++) {
-		if(i) {
+		if (i) {
 			if ((rc = bridge_get_data(my_bg, RM_NextSwitch,
 						  &curr_switch))
 			    != STATUS_OK) {
@@ -150,7 +150,7 @@ static int _get_switches_by_bpid(
 			      bg_err_str(rc));
 		}
 
-		if(!curr_bpid) {
+		if (!curr_bpid) {
 			error("No BP ID was returned from database");
 			continue;
 		}
@@ -158,7 +158,7 @@ static int _get_switches_by_bpid(
 		if (!strcasecmp((char *)bpid, (char *)curr_bpid)) {
 			coord_switch[found_bpid] = curr_switch;
 			found_bpid++;
-			if(found_bpid==SYSTEM_DIMENSIONS) {
+			if (found_bpid==SYSTEM_DIMENSIONS) {
 				free(curr_bpid);
 				return SLURM_SUCCESS;
 			}
@@ -204,7 +204,7 @@ static int _add_switch_conns(rm_switch_t* curr_switch,
 			break;
 		}
 		ba_conn = &ba_switch->int_wire[source];
-		if(ba_conn->used && ba_conn->port_tar != source) {
+		if (ba_conn->used && ba_conn->port_tar != source) {
 			switch(ba_conn->port_tar) {
 			case 0:
 				conn[i].p2 = RM_PORT_S0;
@@ -222,7 +222,7 @@ static int _add_switch_conns(rm_switch_t* curr_switch,
 				break;
 			}
 			conn[i].part_state = RM_PARTITION_READY;
-			if(bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_WIRES)
+			if (bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_WIRES)
 				info("adding %d -> %d", source,
 				     ba_conn->port_tar);
 			list_push(conn_list, &conn[i]);
@@ -230,7 +230,7 @@ static int _add_switch_conns(rm_switch_t* curr_switch,
 	}
 
 	i = list_count(conn_list);
-	if(i) {
+	if (i) {
 		if ((rc = bridge_set_data(curr_switch, RM_SwitchConnNum, &i))
 		    != STATUS_OK) {
 			fatal("bridge_set_data: RM_SwitchConnNum: %s",
@@ -239,15 +239,15 @@ static int _add_switch_conns(rm_switch_t* curr_switch,
 			return SLURM_ERROR;
 		}
 	} else {
-		if(bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_WIRES)
+		if (bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_WIRES)
 			info("we got a switch with no connections");
 		list_destroy(conn_list);
                 return SLURM_ERROR;
 	}
 
 	/* Now we can add them to the mix */
-	while((conn_ptr = list_pop(conn_list))) {
-		if(firstconnect) {
+	while ((conn_ptr = list_pop(conn_list))) {
+		if (firstconnect) {
 			if ((rc = bridge_set_data(
 				     curr_switch,
 				     RM_SwitchFirstConnection,
@@ -291,13 +291,13 @@ static int _used_switches(ba_node_t* ba_node)
 	int i = 0, j = 0, switch_count = 0;
 	int source = 0;
 
-	if(bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_WIRES)
+	if (bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_WIRES)
 		info("checking node %c%c%c",
 		     alpha_num[ba_node->coord[X]],
 		     alpha_num[ba_node->coord[Y]],
 		     alpha_num[ba_node->coord[Z]]);
 	for(i=0; i<SYSTEM_DIMENSIONS; i++) {
-		if(bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_WIRES)
+		if (bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_WIRES)
 			info("dim %d", i);
 		ba_switch = &ba_node->axis_switch[i];
 		for(j=0; j<num_connections; j++) {
@@ -318,10 +318,10 @@ static int _used_switches(ba_node_t* ba_node)
 				break;
 			}
 			ba_conn = &ba_switch->int_wire[source];
-			if(ba_conn->used && ba_conn->port_tar != source) {
+			if (ba_conn->used && ba_conn->port_tar != source) {
 				switch_count++;
-				if(bg_conf->slurm_debug_flags
-				   & DEBUG_FLAG_BG_WIRES)
+				if (bg_conf->slurm_debug_flags
+				    & DEBUG_FLAG_BG_WIRES)
 					info("used");
 				break;
 			}
@@ -350,7 +350,7 @@ extern int configure_small_block(bg_record_t *bg_record)
 	double nc_pos = 0;
 #endif
 	xassert(bg_record->ionode_bitmap);
-	if(bg_record->bp_count != 1) {
+	if (bg_record->bp_count != 1) {
 		error("Requesting small block with %d bps, needs to be 1.",
 		      bg_record->bp_count);
 		return SLURM_ERROR;
@@ -367,7 +367,7 @@ extern int configure_small_block(bg_record_t *bg_record)
 	}
 
 	num_ncards = bg_record->node_cnt/bg_conf->nodecard_node_cnt;
-	if(num_ncards < 1) {
+	if (num_ncards < 1) {
 		num_ncards = 1;
 		sub_nodecard = 1;
 	}
@@ -376,14 +376,14 @@ extern int configure_small_block(bg_record_t *bg_record)
 	/* find out how many nodecards to get for each ionode */
 
 	for(i = 0; i<bg_conf->numpsets; i++) {
-		if(bit_test(bg_record->ionode_bitmap, i)) {
-			if(bg_conf->nc_ratio > 1) {
+		if (bit_test(bg_record->ionode_bitmap, i)) {
+			if (bg_conf->nc_ratio > 1) {
 				int j=0;
 				for(j=0; j<bg_conf->nc_ratio; j++)
 					use_nc[(int)nc_pos+j] = 1;
 			} else {
 				use_nc[(int)nc_pos] = 1;
-				if(i%2)
+				if (i%2)
 					ionode_card = 1;
 			}
 		}
@@ -437,7 +437,7 @@ extern int configure_small_block(bg_record_t *bg_record)
 	}
 
 
-	if(!bp_id) {
+	if (!bp_id) {
 		error("No BP ID was returned from database");
 		return SLURM_ERROR;
 	}
@@ -452,13 +452,13 @@ extern int configure_small_block(bg_record_t *bg_record)
 	free(bp_id);
 
 
-	if((rc = bridge_get_data(ncard_list, RM_NodeCardListSize, &num))
-	   != STATUS_OK) {
+	if ((rc = bridge_get_data(ncard_list, RM_NodeCardListSize, &num))
+	    != STATUS_OK) {
 		error("bridge_get_data(RM_NodeCardListSize): %s",
 		      bg_err_str(rc));
 		return SLURM_ERROR;
 	}
-	if(num_ncards > num) {
+	if (num_ncards > num) {
 		error("You requested more (%d > %d) nodecards "
 		      "than are available on this block %s",
 		      num_ncards, num, bg_record->nodes);
@@ -493,7 +493,7 @@ extern int configure_small_block(bg_record_t *bg_record)
 		   the system happens, but that should be rare.
 		*/
 		nc_id = i;
-		if(!use_nc[i])
+		if (!use_nc[i])
 			continue;
 #else
 		if ((rc = bridge_get_data(ncard,
@@ -505,7 +505,7 @@ extern int configure_small_block(bg_record_t *bg_record)
 			goto cleanup;
 		}
 
-		if(!nc_char) {
+		if (!nc_char) {
 			error("No NodeCard ID was returned from database");
 			rc = SLURM_ERROR;
 			goto cleanup;
@@ -513,16 +513,16 @@ extern int configure_small_block(bg_record_t *bg_record)
 
 		nc_id = atoi((char*)nc_char+1);
 
-		if(!use_nc[nc_id]) {
+		if (!use_nc[nc_id]) {
 			free(nc_char);
 			continue;
 		}
 
-		if(sub_nodecard) {
+		if (sub_nodecard) {
 			rm_ionode_t *ionode;
 			char *ionode_id = "J00";
 
-			if((rc = bridge_new_nodecard(&ncard)) != STATUS_OK) {
+			if ((rc = bridge_new_nodecard(&ncard)) != STATUS_OK) {
 				error("bridge_new_nodecard(): %s",
 				      bg_err_str(rc));
 				rc = SLURM_ERROR;
@@ -551,14 +551,14 @@ extern int configure_small_block(bg_record_t *bg_record)
 				goto cleanup;
 			}
 
-			if((rc = bridge_new_ionode(&ionode)) != STATUS_OK) {
+			if ((rc = bridge_new_ionode(&ionode)) != STATUS_OK) {
 				error("bridge_new_ionode(): %s",
 				      bg_err_str(rc));
 				rc = SLURM_ERROR;
 				goto cleanup;
 			}
 
-			if(ionode_card)
+			if (ionode_card)
 				ionode_id = "J01";
 
 			if ((rc = bridge_set_data(ionode,
@@ -583,7 +583,7 @@ extern int configure_small_block(bg_record_t *bg_record)
 				goto cleanup;
 			}
 
-			if((rc = bridge_free_ionode(ionode)) != STATUS_OK) {
+			if ((rc = bridge_free_ionode(ionode)) != STATUS_OK) {
 				error("bridge_free_ionode(): %s",
 				      bg_err_str(rc));
 				rc = SLURM_ERROR;
@@ -621,8 +621,8 @@ extern int configure_small_block(bg_record_t *bg_record)
 
 		nc_count++;
 #ifndef HAVE_BGL
-		if(sub_nodecard) {
-			if((rc = bridge_free_nodecard(ncard)) != STATUS_OK) {
+		if (sub_nodecard) {
+			if ((rc = bridge_free_nodecard(ncard)) != STATUS_OK) {
 				error("bridge_free_nodecard(): %s",
 				      bg_err_str(rc));
 				rc = SLURM_ERROR;
@@ -630,7 +630,7 @@ extern int configure_small_block(bg_record_t *bg_record)
 			}
 		}
 #endif
-		if(nc_count == num_ncards)
+		if (nc_count == num_ncards)
 			break;
 	}
 cleanup:
@@ -639,7 +639,7 @@ cleanup:
 		return SLURM_ERROR;
 	}
 #endif
-	if(bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_WIRES)
+	if (bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_WIRES)
 		info("making the small block");
 	return rc;
 }
@@ -660,7 +660,7 @@ extern int configure_block_switches(bg_record_t * bg_record)
 	rm_BP_t *curr_bp = NULL;
 	rm_switch_t *coord_switch[SYSTEM_DIMENSIONS];
 #endif
-	if(!bg_record->bg_block_list) {
+	if (!bg_record->bg_block_list) {
 		error("There was no block_list given, can't create block");
 		return SLURM_ERROR;
 	}
@@ -670,7 +670,7 @@ extern int configure_block_switches(bg_record_t * bg_record)
 
 	itr = list_iterator_create(bg_record->bg_block_list);
 	while ((ba_node = list_next(itr))) {
-		if(ba_node->used) {
+		if (ba_node->used) {
 			bg_record->bp_count++;
 		}
 		bg_record->switch_count += _used_switches(ba_node);
@@ -697,9 +697,9 @@ extern int configure_block_switches(bg_record_t * bg_record)
 		goto cleanup;
 	}
 #endif
-	if(bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_WIRES)
+	if (bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_WIRES)
 		info("BP count %d", bg_record->bp_count);
-	if(bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_WIRES)
+	if (bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_WIRES)
 		info("switch count %d", bg_record->switch_count);
 
 	list_iterator_reset(itr);
@@ -711,15 +711,15 @@ extern int configure_block_switches(bg_record_t * bg_record)
 			goto cleanup;
 		}
 #endif
-		if(!ba_node->used) {
-			if(bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_WIRES)
+		if (!ba_node->used) {
+			if (bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_WIRES)
 				info("%c%c%c is a passthrough, "
 				     "not including in request",
 				     alpha_num[ba_node->coord[X]],
 				     alpha_num[ba_node->coord[Y]],
 				     alpha_num[ba_node->coord[Z]]);
 		} else {
-			if(bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_WIRES)
+			if (bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_WIRES)
 				info("using node %c%c%c",
 				     alpha_num[ba_node->coord[X]],
 				     alpha_num[ba_node->coord[Y]],
@@ -756,23 +756,23 @@ extern int configure_block_switches(bg_record_t * bg_record)
 			fatal("bridge_get_data: RM_BPID: %s", bg_err_str(rc));
 		}
 
-		if(!bpid) {
+		if (!bpid) {
 			error("No BP ID was returned from database");
 			continue;
 		}
-		if(_get_switches_by_bpid(bg, bpid, coord_switch)
-		   != SLURM_SUCCESS) {
+		if (_get_switches_by_bpid(bg, bpid, coord_switch)
+		    != SLURM_SUCCESS) {
 			error("Didn't get all the switches for bp %s", bpid);
 			free(bpid);
 			continue;
 		}
 		free(bpid);
 		for(i=0; i<SYSTEM_DIMENSIONS; i++) {
-			if(_add_switch_conns(coord_switch[i],
-					     &ba_node->axis_switch[i])
-			   == SLURM_SUCCESS) {
-				if(bg_conf->slurm_debug_flags
-				   & DEBUG_FLAG_BG_WIRES)
+			if (_add_switch_conns(coord_switch[i],
+					      &ba_node->axis_switch[i])
+			    == SLURM_SUCCESS) {
+				if (bg_conf->slurm_debug_flags
+				    & DEBUG_FLAG_BG_WIRES)
 					info("adding switch dim %d", i);
 				if (first_switch){
 					if ((rc = bridge_set_data(
diff --git a/src/plugins/select/bluegene/plugin/block_sys.c b/src/plugins/select/bluegene/plugin/block_sys.c
index 72a367c1ff8a9c44e4e68fef46ec9785e6c73805..1a91deab56f33104bafc2eea1acf819ccf870026 100755
--- a/src/plugins/select/bluegene/plugin/block_sys.c
+++ b/src/plugins/select/bluegene/plugin/block_sys.c
@@ -157,7 +157,7 @@ static void _pre_allocate(bg_record_t *bg_record)
 		      bg_err_str(rc));
 
 	/* rc = bg_conf->bp_node_cnt/bg_record->node_cnt; */
-/* 	if(rc > 1) */
+/* 	if (rc > 1) */
 /* 		send_psets = bg_conf->numpsets/rc; */
 
 	if ((rc = bridge_set_data(bg_record->bg_block, RM_PartitionPsetsPerBP,
@@ -199,7 +199,7 @@ static int _post_allocate(bg_record_t *bg_record)
 		}
 		sleep(3);
 	}
-	if(rc == SLURM_ERROR) {
+	if (rc == SLURM_ERROR) {
 		info("going to free it");
 		if ((rc = bridge_free_block(bg_record->bg_block))
 		    != STATUS_OK)
@@ -215,7 +215,7 @@ static int _post_allocate(bg_record_t *bg_record)
 		error("bridge_get_data(RM_PartitionID): %s", bg_err_str(rc));
 		bg_record->bg_block_id = xstrdup("UNKNOWN");
 	} else {
-		if(!block_id) {
+		if (!block_id) {
 			error("No Block ID was returned from database");
 			return SLURM_ERROR;
 		}
@@ -247,14 +247,14 @@ static int _post_allocate(bg_record_t *bg_record)
 	*/
 	static int block_inx = 0;
 	int i=0, temp = 0;
-	if(bg_record->bg_block_id) {
-		while(bg_record->bg_block_id[i]
-		      && (bg_record->bg_block_id[i] > '9'
-			  || bg_record->bg_block_id[i] < '0'))
+	if (bg_record->bg_block_id) {
+		while (bg_record->bg_block_id[i]
+		       && (bg_record->bg_block_id[i] > '9'
+			   || bg_record->bg_block_id[i] < '0'))
 			i++;
-		if(bg_record->bg_block_id[i]) {
+		if (bg_record->bg_block_id[i]) {
 			temp = atoi(bg_record->bg_block_id+i)+1;
-			if(temp > block_inx)
+			if (temp > block_inx)
 				block_inx = temp;
 			debug4("first new block inx will now be %d", block_inx);
 		}
@@ -274,7 +274,7 @@ static int _set_ionodes(bg_record_t *bg_record, int io_start, int io_nodes)
 {
 	char bitstring[BITSIZE];
 
-	if(!bg_record)
+	if (!bg_record)
 		return SLURM_ERROR;
 
 	bg_record->ionode_bitmap = bit_alloc(bg_conf->numpsets);
@@ -303,18 +303,18 @@ extern int find_nodecard_num(rm_partition_t *block_ptr, rm_nodecard_t *ncard,
 	xassert(block_ptr);
 	xassert(nc_id);
 
-	if((rc = bridge_get_data(ncard,
-				 RM_NodeCardID,
-				 &my_card_name))
-	   != STATUS_OK) {
+	if ((rc = bridge_get_data(ncard,
+				  RM_NodeCardID,
+				  &my_card_name))
+	    != STATUS_OK) {
 		error("bridge_get_data(RM_NodeCardID): %s",
 		      bg_err_str(rc));
 	}
 
-	if((rc = bridge_get_data(block_ptr,
-				 RM_PartitionFirstBP,
-				 &curr_bp))
-	   != STATUS_OK) {
+	if ((rc = bridge_get_data(block_ptr,
+				  RM_PartitionFirstBP,
+				  &curr_bp))
+	    != STATUS_OK) {
 		error("bridge_get_data(RM_PartitionFirstBP): %s",
 		      bg_err_str(rc));
 	}
@@ -332,8 +332,8 @@ extern int find_nodecard_num(rm_partition_t *block_ptr, rm_nodecard_t *ncard,
 		return SLURM_ERROR;
 	}
 	free(bp_id);
-	if((rc = bridge_get_data(ncard_list, RM_NodeCardListSize, &num))
-	   != STATUS_OK) {
+	if ((rc = bridge_get_data(ncard_list, RM_NodeCardListSize, &num))
+	    != STATUS_OK) {
 		error("bridge_get_data(RM_NodeCardListSize): %s",
 		      bg_err_str(rc));
 		return SLURM_ERROR;
@@ -370,7 +370,7 @@ extern int find_nodecard_num(rm_partition_t *block_ptr, rm_nodecard_t *ncard,
 			rc = SLURM_ERROR;
 			goto cleanup;
 		}
-		if(strcmp(my_card_name, card_name)) {
+		if (strcmp(my_card_name, card_name)) {
 			free(card_name);
 			continue;
 		}
@@ -393,7 +393,7 @@ extern int configure_block(bg_record_t *bg_record)
 #endif
 	_pre_allocate(bg_record);
 
-	if(bg_record->cpu_cnt < bg_conf->cpus_per_bp)
+	if (bg_record->cpu_cnt < bg_conf->cpus_per_bp)
 		configure_small_block(bg_record);
 	else
 		configure_block_switches(bg_record);
@@ -432,7 +432,7 @@ int read_bg_blocks(List curr_block_list)
 
 	set_bp_map();
 
-	if(bg_recover) {
+	if (bg_recover) {
 		if ((rc = bridge_get_blocks(state, &block_list))
 		    != STATUS_OK) {
 			error("2 rm_get_blocks(): %s", bg_err_str(rc));
@@ -482,12 +482,12 @@ int read_bg_blocks(List curr_block_list)
 			continue;
 		}
 
-		if(!tmp_char) {
+		if (!tmp_char) {
 			error("No Block ID was returned from database");
 			continue;
 		}
 
-		if(strncmp("RMP", tmp_char, 3)) {
+		if (strncmp("RMP", tmp_char, 3)) {
 			free(tmp_char);
 			continue;
 		}
@@ -512,7 +512,7 @@ int read_bg_blocks(List curr_block_list)
 			continue;
 		}
 
-		if(bp_cnt==0)
+		if (bp_cnt==0)
 			continue;
 
 		bg_record->node_cnt = bp_cnt;
@@ -529,7 +529,7 @@ int read_bg_blocks(List curr_block_list)
 			continue;
 		}
 
-		if(bp_cnt==0)
+		if (bp_cnt==0)
 			continue;
 		bg_record->bp_count = bp_cnt;
 
@@ -551,7 +551,7 @@ int read_bg_blocks(List curr_block_list)
 			continue;
 		}
 
-		if(small) {
+		if (small) {
 			if ((rc = bridge_get_data(block_ptr,
 						  RM_PartitionOptions,
 						  &tmp_char))
@@ -559,7 +559,7 @@ int read_bg_blocks(List curr_block_list)
 				error("bridge_get_data(RM_PartitionOptions): "
 				      "%s", bg_err_str(rc));
 				continue;
-			} else if(tmp_char) {
+			} else if (tmp_char) {
 				switch(tmp_char[0]) {
 				case 's':
 					bg_record->conn_type = SELECT_HTC_S;
@@ -582,20 +582,20 @@ int read_bg_blocks(List curr_block_list)
 			} else
 				bg_record->conn_type = SELECT_SMALL;
 
-			if((rc = bridge_get_data(block_ptr,
-						 RM_PartitionFirstNodeCard,
-						 &ncard))
-			   != STATUS_OK) {
+			if ((rc = bridge_get_data(block_ptr,
+						  RM_PartitionFirstNodeCard,
+						  &ncard))
+			    != STATUS_OK) {
 				error("bridge_get_data("
 				      "RM_PartitionFirstNodeCard): %s",
 				      bg_err_str(rc));
 				continue;
 			}
 
-			if((rc = bridge_get_data(block_ptr,
-						 RM_PartitionNodeCardNum,
-						 &nc_cnt))
-			   != STATUS_OK) {
+			if ((rc = bridge_get_data(block_ptr,
+						  RM_PartitionNodeCardNum,
+						  &nc_cnt))
+			    != STATUS_OK) {
 				error("bridge_get_data("
 				      "RM_PartitionNodeCardNum): %s",
 				      bg_err_str(rc));
@@ -603,11 +603,11 @@ int read_bg_blocks(List curr_block_list)
 			}
 #ifdef HAVE_BGL
 			/* Translate nodecard count to ionode count */
-			if((io_cnt = nc_cnt * bg_conf->io_ratio))
+			if ((io_cnt = nc_cnt * bg_conf->io_ratio))
 				io_cnt--;
 
 			nc_id = 0;
-			if(nc_cnt == 1)
+			if (nc_cnt == 1)
 				find_nodecard_num(block_ptr, ncard, &nc_id);
 
 			bg_record->node_cnt =
@@ -625,7 +625,7 @@ int read_bg_blocks(List curr_block_list)
 			io_start += bg_conf->nodecard_ionode_cnt * (nc_id%4);
 #else
 			/* Translate nodecard count to ionode count */
-			if((io_cnt = nc_cnt * bg_conf->io_ratio))
+			if ((io_cnt = nc_cnt * bg_conf->io_ratio))
 				io_cnt--;
 
 			if ((rc = bridge_get_data(ncard,
@@ -635,7 +635,7 @@ int read_bg_blocks(List curr_block_list)
 				continue;
 			}
 
-			if(!tmp_char)
+			if (!tmp_char)
 				continue;
 
 			/* From the first nodecard id we can figure
@@ -644,7 +644,7 @@ int read_bg_blocks(List curr_block_list)
 			nc_id = atoi((char*)tmp_char+1);
 			free(tmp_char);
 			io_start = nc_id * bg_conf->io_ratio;
-			if(bg_record->node_cnt < bg_conf->nodecard_node_cnt) {
+			if (bg_record->node_cnt < bg_conf->nodecard_node_cnt) {
 				rm_ionode_t *ionode;
 
 				/* figure out the ionode we are using */
@@ -668,7 +668,7 @@ int read_bg_blocks(List curr_block_list)
 					continue;
 				}
 
-				if(!tmp_char)
+				if (!tmp_char)
 					continue;
 				/* just add the ionode num to the
 				 * io_start */
@@ -679,8 +679,8 @@ int read_bg_blocks(List curr_block_list)
 				io_cnt = 0;
 			}
 #endif
-			if(_set_ionodes(bg_record, io_start, io_cnt)
-			   == SLURM_ERROR)
+			if (_set_ionodes(bg_record, io_start, io_cnt)
+			    == SLURM_ERROR)
 				error("couldn't create ionode_bitmap "
 				      "for ionodes %d to %d",
 				      io_start, io_start+io_cnt);
@@ -712,14 +712,14 @@ int read_bg_blocks(List curr_block_list)
 
 		bg_record->bg_block_list = get_and_set_block_wiring(
 			bg_record->bg_block_id, block_ptr);
-		if(!bg_record->bg_block_list)
+		if (!bg_record->bg_block_list)
 			fatal("couldn't get the wiring info for block %s",
 			      bg_record->bg_block_id);
 
 		hostlist = hostlist_create(NULL);
 
 		for (i=0; i<bp_cnt; i++) {
-			if(i) {
+			if (i) {
 				if ((rc = bridge_get_data(block_ptr,
 							  RM_PartitionNextBP,
 							  &bp_ptr))
@@ -749,14 +749,14 @@ int read_bg_blocks(List curr_block_list)
 				break;
 			}
 
-			if(!bpid) {
+			if (!bpid) {
 				error("No BP ID was returned from database");
 				continue;
 			}
 
 			coord = find_bp_loc(bpid);
 
-			if(!coord) {
+			if (!coord) {
 				fatal("Could not find coordinates for "
 				      "BP ID %s", (char *) bpid);
 			}
@@ -792,7 +792,7 @@ int read_bg_blocks(List curr_block_list)
 			error("bridge_get_data(RM_PartitionState): %s",
 			      bg_err_str(rc));
 			continue;
-		} else if(bg_record->state == RM_PARTITION_CONFIGURING)
+		} else if (bg_record->state == RM_PARTITION_CONFIGURING)
 			bg_record->boot_state = 1;
 
 		debug3("Block %s is in state %d",
@@ -804,7 +804,7 @@ int read_bg_blocks(List curr_block_list)
 		/* We can stop processing information now since we
 		   don't need to rest of the information to decide if
 		   this is the correct block. */
-		if(bg_conf->layout_mode == LAYOUT_DYNAMIC) {
+		if (bg_conf->layout_mode == LAYOUT_DYNAMIC) {
 			bg_record_t *tmp_record = xmalloc(sizeof(bg_record_t));
 			copy_bg_record(bg_record, tmp_record);
 			list_push(bg_lists->main, tmp_record);
@@ -816,7 +816,7 @@ int read_bg_blocks(List curr_block_list)
 			      bg_err_str(rc));
 			continue;
 		} else {
-			if(bp_cnt==0) {
+			if (bp_cnt==0) {
 
 				bg_record->user_name =
 					xstrdup(bg_conf->slurm_user_name);
@@ -871,7 +871,7 @@ int read_bg_blocks(List curr_block_list)
 			      bg_err_str(rc));
 			continue;
 		}
-		if(!user_name) {
+		if (!user_name) {
 			error("No BlrtsImg was returned from database");
 			continue;
 		}
@@ -885,7 +885,7 @@ int read_bg_blocks(List curr_block_list)
 			      bg_err_str(rc));
 			continue;
 		}
-		if(!user_name) {
+		if (!user_name) {
 			error("No LinuxImg was returned from database");
 			continue;
 		}
@@ -899,7 +899,7 @@ int read_bg_blocks(List curr_block_list)
 			      bg_err_str(rc));
 			continue;
 		}
-		if(!user_name) {
+		if (!user_name) {
 			error("No RamdiskImg was returned from database");
 			continue;
 		}
@@ -914,7 +914,7 @@ int read_bg_blocks(List curr_block_list)
 			      bg_err_str(rc));
 			continue;
 		}
-		if(!user_name) {
+		if (!user_name) {
 			error("No CnloadImg was returned from database");
 			continue;
 		}
@@ -928,7 +928,7 @@ int read_bg_blocks(List curr_block_list)
 			      bg_err_str(rc));
 			continue;
 		}
-		if(!user_name) {
+		if (!user_name) {
 			error("No IoloadImg was returned from database");
 			continue;
 		}
@@ -943,7 +943,7 @@ int read_bg_blocks(List curr_block_list)
 			      bg_err_str(rc));
 			continue;
 		}
-		if(!user_name) {
+		if (!user_name) {
 			error("No MloaderImg was returned from database");
 			continue;
 		}
@@ -983,7 +983,7 @@ extern int load_state_file(List curr_block_list, char *dir_name)
 	ListIterator itr = NULL;
 	uint16_t protocol_version = (uint16_t)NO_VAL;
 
-	if(!dir_name) {
+	if (!dir_name) {
 		debug2("Starting bluegene with clean slate");
 		return SLURM_SUCCESS;
 	}
@@ -993,7 +993,7 @@ extern int load_state_file(List curr_block_list, char *dir_name)
 	state_file = xstrdup(dir_name);
 	xstrcat(state_file, "/block_state");
 	state_fd = open(state_file, O_RDONLY);
-	if(state_fd < 0) {
+	if (state_fd < 0) {
 		error("No block state file (%s) to recover", state_file);
 		xfree(state_file);
 		return SLURM_SUCCESS;
@@ -1024,10 +1024,10 @@ extern int load_state_file(List curr_block_list, char *dir_name)
 	buffer = create_buf(data, data_size);
 	safe_unpackstr_xmalloc(&ver_str, &ver_str_len, buffer);
 	debug3("Version string in block_state header is %s", ver_str);
-	if(ver_str) {
-		if(!strcmp(ver_str, BLOCK_STATE_VERSION)) {
+	if (ver_str) {
+		if (!strcmp(ver_str, BLOCK_STATE_VERSION)) {
 			protocol_version = SLURM_PROTOCOL_VERSION;
-		} else if(!strcmp(ver_str, BLOCK_2_1_STATE_VERSION)) {
+		} else if (!strcmp(ver_str, BLOCK_2_1_STATE_VERSION)) {
 			protocol_version = SLURM_2_1_PROTOCOL_VERSION;
 		}
 	}
@@ -1042,8 +1042,8 @@ extern int load_state_file(List curr_block_list, char *dir_name)
 		return EFAULT;
 	}
 	xfree(ver_str);
-	if(slurm_unpack_block_info_msg(&block_ptr, buffer, protocol_version)
-	   == SLURM_ERROR) {
+	if (slurm_unpack_block_info_msg(&block_ptr, buffer, protocol_version)
+	    == SLURM_ERROR) {
 		error("select_p_state_restore: problem unpacking block_info");
 		goto unpack_error;
 	}
@@ -1054,11 +1054,11 @@ extern int load_state_file(List curr_block_list, char *dir_name)
 
 		/* we only care about the states we need here
 		 * everthing else should have been set up already */
-		if(block_info->state == RM_PARTITION_ERROR) {
+		if (block_info->state == RM_PARTITION_ERROR) {
 			slurm_mutex_lock(&block_state_mutex);
-			if((bg_record = find_bg_record_in_list(
-				    curr_block_list,
-				    block_info->bg_block_id)))
+			if ((bg_record = find_bg_record_in_list(
+				     curr_block_list,
+				     block_info->bg_block_id)))
 				/* put_block_in_error_state should be
 				   called after the bg_lists->main has been
 				   made.  We can't call it here since
@@ -1083,7 +1083,7 @@ extern int load_state_file(List curr_block_list, char *dir_name)
 	itr = list_iterator_create(part_list);
 	while ((part_ptr = list_next(itr))) {
 		/* we only want to use bps that are in partitions */
-		if(!part_ptr->node_bitmap) {
+		if (!part_ptr->node_bitmap) {
 			debug4("Partition %s doesn't have any nodes in it.",
 			       part_ptr->name);
 			continue;
@@ -1093,7 +1093,7 @@ extern int load_state_file(List curr_block_list, char *dir_name)
 	list_iterator_destroy(itr);
 
 	bit_not(bitmap);
-	if(bit_ffs(bitmap) != -1) {
+	if (bit_ffs(bitmap) != -1) {
 		fatal("We don't have any nodes in any partitions.  "
 		      "Can't create blocks.  "
 		      "Please check your slurm.conf.");
@@ -1111,13 +1111,13 @@ extern int load_state_file(List curr_block_list, char *dir_name)
 		bit_nclear(ionode_bitmap, 0, bit_size(ionode_bitmap) - 1);
 
 		j = 0;
-		while(block_info->bp_inx[j] >= 0) {
+		while (block_info->bp_inx[j] >= 0) {
 			if (block_info->bp_inx[j+1]
 			    >= node_record_count) {
 				fatal("Job state recovered incompatible with "
-					"bluegene.conf. bp=%u state=%d",
-					node_record_count,
-					block_info->bp_inx[j+1]);
+				      "bluegene.conf. bp=%u state=%d",
+				      node_record_count,
+				      block_info->bp_inx[j+1]);
 			}
 			bit_nset(node_bitmap,
 				 block_info->bp_inx[j],
@@ -1126,13 +1126,13 @@ extern int load_state_file(List curr_block_list, char *dir_name)
 		}
 
 		j = 0;
-		while(block_info->ionode_inx[j] >= 0) {
+		while (block_info->ionode_inx[j] >= 0) {
 			if (block_info->ionode_inx[j+1]
 			    >= bg_conf->numpsets) {
 				fatal("Job state recovered incompatible with "
-					"bluegene.conf. ionodes=%u state=%d",
-					bg_conf->numpsets,
-					block_info->ionode_inx[j+1]);
+				      "bluegene.conf. ionodes=%u state=%d",
+				      bg_conf->numpsets,
+				      block_info->ionode_inx[j+1]);
 			}
 			bit_nset(ionode_bitmap,
 				 block_info->ionode_inx[j],
@@ -1160,7 +1160,7 @@ extern int load_state_file(List curr_block_list, char *dir_name)
 
 		bg_record->bp_count = bit_set_count(node_bitmap);
 		bg_record->node_cnt = block_info->node_cnt;
-		if(bg_conf->bp_node_cnt > bg_record->node_cnt) {
+		if (bg_conf->bp_node_cnt > bg_record->node_cnt) {
 			ionodes = bg_conf->bp_node_cnt
 				/ bg_record->node_cnt;
 			bg_record->cpu_cnt = bg_conf->cpus_per_bp / ionodes;
@@ -1199,8 +1199,8 @@ extern int load_state_file(List curr_block_list, char *dir_name)
 		for(j=0; j<SYSTEM_DIMENSIONS; j++)
 			geo[j] = bg_record->geo[j];
 
-		if((bg_conf->layout_mode == LAYOUT_OVERLAP)
-		   || bg_record->full_block) {
+		if ((bg_conf->layout_mode == LAYOUT_OVERLAP)
+		    || bg_record->full_block) {
 			reset_ba_system(false);
 		}
 
@@ -1208,8 +1208,8 @@ extern int load_state_file(List curr_block_list, char *dir_name)
 		/* we want the bps that aren't
 		 * in this record to mark them as used
 		 */
-		if(set_all_bps_except(bg_record->nodes)
-		   != SLURM_SUCCESS)
+		if (set_all_bps_except(bg_record->nodes)
+		    != SLURM_SUCCESS)
 			fatal("something happened in "
 			      "the load of %s.  "
 			      "Did you use smap to "
@@ -1223,7 +1223,7 @@ extern int load_state_file(List curr_block_list, char *dir_name)
 				    bg_record->conn_type);
 		reset_all_removed_bps();
 
-		if(!name) {
+		if (!name) {
 			error("I was unable to "
 			      "make the "
 			      "requested block.");
@@ -1238,13 +1238,13 @@ extern int load_state_file(List curr_block_list, char *dir_name)
 			 name);
 
 		xfree(name);
-		if(strcmp(temp, bg_record->nodes)) {
+		if (strcmp(temp, bg_record->nodes)) {
 			fatal("bad wiring in preserved state "
 			      "(found %s, but allocated %s) "
 			      "YOU MUST COLDSTART",
 			      bg_record->nodes, temp);
 		}
-		if(bg_record->bg_block_list)
+		if (bg_record->bg_block_list)
 			list_destroy(bg_record->bg_block_list);
 		bg_record->bg_block_list =
 			list_create(destroy_ba_node);
@@ -1254,7 +1254,7 @@ extern int load_state_file(List curr_block_list, char *dir_name)
 		configure_block(bg_record);
 		blocks++;
 		list_push(curr_block_list, bg_record);
-		if(bg_conf->layout_mode == LAYOUT_DYNAMIC) {
+		if (bg_conf->layout_mode == LAYOUT_DYNAMIC) {
 			bg_record_t *tmp_record = xmalloc(sizeof(bg_record_t));
 			copy_bg_record(bg_record, tmp_record);
 			list_push(bg_lists->main, tmp_record);
diff --git a/src/plugins/select/bluegene/plugin/bluegene.c b/src/plugins/select/bluegene/plugin/bluegene.c
index 69f024b485d49f3076088359fa535acb1050bd39..53328be4d5dcf1d95a845ed337dad514860643f6 100644
--- a/src/plugins/select/bluegene/plugin/bluegene.c
+++ b/src/plugins/select/bluegene/plugin/bluegene.c
@@ -96,7 +96,7 @@ extern int init_bg(void)
 {
 	_set_bg_lists();
 
-	if(!bg_conf)
+	if (!bg_conf)
 		bg_conf = xmalloc(sizeof(bg_config_t));
 
 	xfree(bg_conf->slurm_user_name);
@@ -110,17 +110,17 @@ extern int init_bg(void)
 	slurm_conf_unlock();
 
 #ifdef HAVE_BGL
-	if(bg_conf->blrts_list)
+	if (bg_conf->blrts_list)
 		list_destroy(bg_conf->blrts_list);
 	bg_conf->blrts_list = list_create(destroy_image);
 #endif
-	if(bg_conf->linux_list)
+	if (bg_conf->linux_list)
 		list_destroy(bg_conf->linux_list);
 	bg_conf->linux_list = list_create(destroy_image);
-	if(bg_conf->mloader_list)
+	if (bg_conf->mloader_list)
 		list_destroy(bg_conf->mloader_list);
 	bg_conf->mloader_list = list_create(destroy_image);
-	if(bg_conf->ramdisk_list)
+	if (bg_conf->ramdisk_list)
 		list_destroy(bg_conf->ramdisk_list);
 	bg_conf->ramdisk_list = list_create(destroy_image);
 
@@ -134,7 +134,7 @@ extern int init_bg(void)
 /* Purge all plugin variables */
 extern void fini_bg(void)
 {
-	if(!agent_fini) {
+	if (!agent_fini) {
 		error("The agent hasn't been finied yet!");
 		agent_fini = true;
 	}
@@ -150,20 +150,20 @@ extern void fini_bg(void)
  */
 extern bool blocks_overlap(bg_record_t *rec_a, bg_record_t *rec_b)
 {
-	if((rec_a->bp_count > 1) && (rec_b->bp_count > 1)) {
+	if ((rec_a->bp_count > 1) && (rec_b->bp_count > 1)) {
 		/* Test for conflicting passthroughs */
 		reset_ba_system(false);
 		check_and_set_node_list(rec_a->bg_block_list);
-		if(check_and_set_node_list(rec_b->bg_block_list)
-		   == SLURM_ERROR)
+		if (check_and_set_node_list(rec_b->bg_block_list)
+		    == SLURM_ERROR)
 			return true;
 	}
 
 	if (!bit_overlap(rec_a->bitmap, rec_b->bitmap))
 		return false;
 
-	if((rec_a->node_cnt >= bg_conf->bp_node_cnt)
-	   || (rec_b->node_cnt >= bg_conf->bp_node_cnt))
+	if ((rec_a->node_cnt >= bg_conf->bp_node_cnt)
+	    || (rec_b->node_cnt >= bg_conf->bp_node_cnt))
 		return true;
 
 	if (!bit_overlap(rec_a->ionode_bitmap, rec_b->ionode_bitmap))
@@ -206,8 +206,8 @@ extern int remove_all_users(char *bg_block_id, char *user_name)
 	   filled in there.  This function is very slow but necessary
 	   here to get the correct block count and the users. */
 	if ((rc = bridge_get_block(bg_block_id, &block_ptr)) != STATUS_OK) {
-		if(rc == INCONSISTENT_DATA
-		   && bg_conf->layout_mode == LAYOUT_DYNAMIC)
+		if (rc == INCONSISTENT_DATA
+		    && bg_conf->layout_mode == LAYOUT_DYNAMIC)
 			return REMOVE_USER_FOUND;
 
 		error("bridge_get_block(%s): %s",
@@ -216,18 +216,18 @@ extern int remove_all_users(char *bg_block_id, char *user_name)
 		return REMOVE_USER_ERR;
 	}
 
-	if((rc = bridge_get_data(block_ptr, RM_PartitionUsersNum,
-				 &user_count))
-	   != STATUS_OK) {
+	if ((rc = bridge_get_data(block_ptr, RM_PartitionUsersNum,
+				  &user_count))
+	    != STATUS_OK) {
 		error("bridge_get_data(RM_PartitionUsersNum): %s",
 		      bg_err_str(rc));
 		returnc = REMOVE_USER_ERR;
 		user_count = 0;
 	} else
-		if(bg_conf->slurm_debug_flags & DEBUG_FLAG_SELECT_TYPE)
+		if (bg_conf->slurm_debug_flags & DEBUG_FLAG_SELECT_TYPE)
 			info("got %d users for %s", user_count, bg_block_id);
 	for(i=0; i<user_count; i++) {
-		if(i) {
+		if (i) {
 			if ((rc = bridge_get_data(block_ptr,
 						  RM_PartitionNextUser,
 						  &user))
@@ -250,17 +250,17 @@ extern int remove_all_users(char *bg_block_id, char *user_name)
 				break;
 			}
 		}
-		if(!user) {
+		if (!user) {
 			error("No user was returned from database");
 			continue;
 		}
-		if(!strcmp(user, bg_conf->slurm_user_name)) {
+		if (!strcmp(user, bg_conf->slurm_user_name)) {
 			free(user);
 			continue;
 		}
 
-		if(user_name) {
-			if(!strcmp(user, user_name)) {
+		if (user_name) {
+			if (!strcmp(user, user_name)) {
 				returnc = REMOVE_USER_FOUND;
 				free(user);
 				continue;
@@ -290,14 +290,14 @@ extern int remove_all_users(char *bg_block_id, char *user_name)
 extern int set_block_user(bg_record_t *bg_record)
 {
 	int rc = 0;
-	if(bg_conf->slurm_debug_flags & DEBUG_FLAG_SELECT_TYPE)
+	if (bg_conf->slurm_debug_flags & DEBUG_FLAG_SELECT_TYPE)
 		info("resetting the boot state flag and "
 		     "counter for block %s.",
 		     bg_record->bg_block_id);
 	bg_record->boot_state = 0;
 	bg_record->boot_count = 0;
 
-	if((rc = update_block_user(bg_record, 1)) == 1) {
+	if ((rc = update_block_user(bg_record, 1)) == 1) {
 		last_bg_update = time(NULL);
 		rc = SLURM_SUCCESS;
 	} else if (rc == -1) {
@@ -338,11 +338,11 @@ extern void *block_agent(void *args)
 		if (difftime(now, last_bg_test) >= BG_POLL_TIME) {
 			if (agent_fini)		/* don't bother */
 				break;	/* quit now */
-			if(blocks_are_created) {
+			if (blocks_are_created) {
 				last_bg_test = now;
-				if((rc = update_block_list()) == 1)
+				if ((rc = update_block_list()) == 1)
 					last_bg_update = now;
-				else if(rc == -1)
+				else if (rc == -1)
 					error("Error with update_block_list");
 			}
 		}
@@ -368,7 +368,7 @@ extern void *state_agent(void *args)
 		if (difftime(now, last_mmcs_test) >= MMCS_POLL_TIME) {
 			if (agent_fini)		/* don't bother */
 				break; 	/* quit now */
-			if(blocks_are_created) {
+			if (blocks_are_created) {
 				/* can run for a while so set the
 				 * time after the call so there is
 				 * always MMCS_POLL_TIME between
@@ -392,14 +392,14 @@ extern int remove_from_bg_list(List my_bg_list, bg_record_t *bg_record)
 	ListIterator itr;
 	int rc = SLURM_ERROR;
 
-	if(!bg_record)
+	if (!bg_record)
 		return rc;
 
 	//slurm_mutex_lock(&block_state_mutex);
 	itr = list_iterator_create(my_bg_list);
 	while ((found_record = list_next(itr))) {
-		if(found_record)
-			if(bg_record == found_record) {
+		if (found_record)
+			if (bg_record == found_record) {
 				list_remove(itr);
 				rc = SLURM_SUCCESS;
 				break;
@@ -422,14 +422,14 @@ extern bg_record_t *find_and_remove_org_from_bg_list(List my_list,
 
 	while ((found_record = (bg_record_t *) list_next(itr)) != NULL) {
 		/* check for full node bitmap compare */
-		if(bit_equal(bg_record->bitmap, found_record->bitmap)
-		   && bit_equal(bg_record->ionode_bitmap,
-				found_record->ionode_bitmap)) {
-			if(!strcmp(bg_record->bg_block_id,
-				   found_record->bg_block_id)) {
+		if (bit_equal(bg_record->bitmap, found_record->bitmap)
+		    && bit_equal(bg_record->ionode_bitmap,
+				 found_record->ionode_bitmap)) {
+			if (!strcmp(bg_record->bg_block_id,
+				    found_record->bg_block_id)) {
 				list_remove(itr);
-				if(bg_conf->slurm_debug_flags
-				   & DEBUG_FLAG_SELECT_TYPE)
+				if (bg_conf->slurm_debug_flags
+				    & DEBUG_FLAG_SELECT_TYPE)
 					info("got the block");
 				break;
 			}
@@ -448,14 +448,14 @@ extern bg_record_t *find_org_in_bg_list(List my_list, bg_record_t *bg_record)
 
 	while ((found_record = (bg_record_t *) list_next(itr)) != NULL) {
 		/* check for full node bitmap compare */
-		if(bit_equal(bg_record->bitmap, found_record->bitmap)
-		   && bit_equal(bg_record->ionode_bitmap,
-				found_record->ionode_bitmap)) {
-
-			if(!strcmp(bg_record->bg_block_id,
-				   found_record->bg_block_id)) {
-				if(bg_conf->slurm_debug_flags
-				   & DEBUG_FLAG_SELECT_TYPE)
+		if (bit_equal(bg_record->bitmap, found_record->bitmap)
+		    && bit_equal(bg_record->ionode_bitmap,
+				 found_record->ionode_bitmap)) {
+
+			if (!strcmp(bg_record->bg_block_id,
+				    found_record->bg_block_id)) {
+				if (bg_conf->slurm_debug_flags
+				    & DEBUG_FLAG_SELECT_TYPE)
 					info("got the block");
 				break;
 			}
@@ -470,19 +470,19 @@ extern int bg_free_block(bg_record_t *bg_record, bool wait, bool locked)
 	int rc = SLURM_SUCCESS;
 	int count = 0;
 
-	if(!bg_record) {
+	if (!bg_record) {
 		error("bg_free_block: there was no bg_record");
 		return SLURM_ERROR;
 	}
 
-	if(!locked)
+	if (!locked)
 		slurm_mutex_lock(&block_state_mutex);
 
 	while (count < MAX_FREE_RETRIES) {
 		/* block was removed */
-		if(bg_record->magic != BLOCK_MAGIC) {
+		if (bg_record->magic != BLOCK_MAGIC) {
 			error("block was removed while freeing it here");
-			if(!locked)
+			if (!locked)
 				slurm_mutex_unlock(&block_state_mutex);
 			return SLURM_SUCCESS;
 		}
@@ -500,16 +500,16 @@ extern int bg_free_block(bg_record_t *bg_record, bool wait, bool locked)
 		    && bg_record->state != RM_PARTITION_FREE
 		    && bg_record->state != RM_PARTITION_DEALLOCATING) {
 #ifdef HAVE_BG_FILES
-			if(bg_conf->slurm_debug_flags & DEBUG_FLAG_SELECT_TYPE)
+			if (bg_conf->slurm_debug_flags & DEBUG_FLAG_SELECT_TYPE)
 				info("bridge_destroy %s",
 				     bg_record->bg_block_id);
 			rc = bridge_destroy_block(bg_record->bg_block_id);
 			if (rc != STATUS_OK) {
-				if(rc == PARTITION_NOT_FOUND) {
+				if (rc == PARTITION_NOT_FOUND) {
 					debug("block %s is not found",
 					      bg_record->bg_block_id);
 					break;
-				} else if(rc == INCOMPATIBLE_STATE) {
+				} else if (rc == INCOMPATIBLE_STATE) {
 #ifndef HAVE_BGL
 					/* If the state is error and
 					   we get an incompatible
@@ -517,12 +517,12 @@ extern int bg_free_block(bg_record_t *bg_record, bool wait, bool locked)
 					   we set it ourselves so
 					   break out.
 					*/
-					if(bg_record->state
-					   == RM_PARTITION_ERROR)
+					if (bg_record->state
+					    == RM_PARTITION_ERROR)
 						break;
 #endif
-					if(bg_conf->slurm_debug_flags
-					   & DEBUG_FLAG_SELECT_TYPE)
+					if (bg_conf->slurm_debug_flags
+					    & DEBUG_FLAG_SELECT_TYPE)
 						info("bridge_destroy_partition"
 						     "(%s): %s State = %d",
 						     bg_record->bg_block_id,
@@ -560,13 +560,13 @@ extern int bg_free_block(bg_record_t *bg_record, bool wait, bool locked)
 	}
 
 	rc = SLURM_SUCCESS;
-	if(bg_record->state == RM_PARTITION_FREE)
+	if (bg_record->state == RM_PARTITION_FREE)
 		remove_from_bg_list(bg_lists->booted, bg_record);
 	else if (count >= MAX_FREE_RETRIES) {
 		/* Something isn't right, go mark this one in an error
 		   state. */
 		update_block_msg_t block_msg;
-		if(bg_conf->slurm_debug_flags & DEBUG_FLAG_SELECT_TYPE)
+		if (bg_conf->slurm_debug_flags & DEBUG_FLAG_SELECT_TYPE)
 			info("bg_free_block: block %s is not in state "
 			     "free (%s), putting it in error state.",
 			     bg_record->bg_block_id,
@@ -580,7 +580,7 @@ extern int bg_free_block(bg_record_t *bg_record, bool wait, bool locked)
 		slurm_mutex_lock(&block_state_mutex);
 		rc = SLURM_ERROR;
 	}
-	if(!locked)
+	if (!locked)
 		slurm_mutex_unlock(&block_state_mutex);
 
 	return rc;
@@ -596,13 +596,13 @@ extern int free_block_list(uint32_t job_id, List track_list,
 	int track_cnt = 0, free_cnt = 0, retry_cnt = 0, rc = SLURM_SUCCESS;
 	bool restore = true;
 
-	if(!track_list || !(track_cnt = list_count(track_list)))
+	if (!track_list || !(track_cnt = list_count(track_list)))
 		return SLURM_SUCCESS;
 
 	slurm_mutex_lock(&block_state_mutex);
 	itr = list_iterator_create(track_list);
 	while ((bg_record = list_next(itr))) {
-		if(bg_record->magic != BLOCK_MAGIC) {
+		if (bg_record->magic != BLOCK_MAGIC) {
 			error("block was already destroyed");
 			free_cnt++;
 			continue;
@@ -620,8 +620,8 @@ extern int free_block_list(uint32_t job_id, List track_list,
 			bg_requeue_job(bg_record->job_ptr->job_id, 0);
 			slurm_mutex_lock(&block_state_mutex);
 		}
-		if(remove_from_bg_list(bg_lists->job_running, bg_record)
-		   == SLURM_SUCCESS)
+		if (remove_from_bg_list(bg_lists->job_running, bg_record)
+		    == SLURM_SUCCESS)
 			num_unused_cpus += bg_record->cpu_cnt;
 
 		/* we will wait below */
@@ -728,7 +728,7 @@ extern int read_bg_conf(void)
 	ListIterator itr = NULL;
 	char* bg_conf_file = NULL;
 
-	if(bg_conf->slurm_debug_flags & DEBUG_FLAG_SELECT_TYPE)
+	if (bg_conf->slurm_debug_flags & DEBUG_FLAG_SELECT_TYPE)
 		info("Reading the bluegene.conf file");
 
 	/* check if config file has changed */
@@ -738,8 +738,8 @@ extern int read_bg_conf(void)
 		fatal("can't stat bluegene.conf file %s: %m", bg_conf_file);
 	if (last_config_update) {
 		_reopen_bridge_log();
-		if(last_config_update == config_stat.st_mtime) {
-			if(bg_conf->slurm_debug_flags & DEBUG_FLAG_SELECT_TYPE)
+		if (last_config_update == config_stat.st_mtime) {
+			if (bg_conf->slurm_debug_flags & DEBUG_FLAG_SELECT_TYPE)
 				info("%s unchanged", bg_conf_file);
 		} else {
 			info("Restart slurmctld for %s changes "
@@ -756,7 +756,7 @@ extern int read_bg_conf(void)
 	/* bg_conf defined in bg_node_alloc.h */
 	tbl = s_p_hashtbl_create(bg_conf_file_options);
 
-	if(s_p_parse_file(tbl, NULL, bg_conf_file) == SLURM_ERROR)
+	if (s_p_parse_file(tbl, NULL, bg_conf_file) == SLURM_ERROR)
 		fatal("something wrong with opening/reading bluegene "
 		      "conf file");
 	xfree(bg_conf_file);
@@ -770,7 +770,7 @@ extern int read_bg_conf(void)
 		}
 	}
 	if (!s_p_get_string(&bg_conf->default_blrtsimage, "BlrtsImage", tbl)) {
-		if(!list_count(bg_conf->blrts_list))
+		if (!list_count(bg_conf->blrts_list))
 			fatal("BlrtsImage not configured "
 			      "in bluegene.conf");
 		itr = list_iterator_create(bg_conf->blrts_list);
@@ -782,7 +782,7 @@ extern int read_bg_conf(void)
 		     "If this isn't correct please set BlrtsImage",
 		     bg_conf->default_blrtsimage);
 	} else {
-		if(bg_conf->slurm_debug_flags & DEBUG_FLAG_SELECT_TYPE)
+		if (bg_conf->slurm_debug_flags & DEBUG_FLAG_SELECT_TYPE)
 			info("default BlrtsImage %s",
 			     bg_conf->default_blrtsimage);
 		image = xmalloc(sizeof(image_t));
@@ -801,7 +801,7 @@ extern int read_bg_conf(void)
 		}
 	}
 	if (!s_p_get_string(&bg_conf->default_linuximage, "LinuxImage", tbl)) {
-		if(!list_count(bg_conf->linux_list))
+		if (!list_count(bg_conf->linux_list))
 			fatal("LinuxImage not configured "
 			      "in bluegene.conf");
 		itr = list_iterator_create(bg_conf->linux_list);
@@ -813,7 +813,7 @@ extern int read_bg_conf(void)
 		     "If this isn't correct please set LinuxImage",
 		     bg_conf->default_linuximage);
 	} else {
-		if(bg_conf->slurm_debug_flags & DEBUG_FLAG_SELECT_TYPE)
+		if (bg_conf->slurm_debug_flags & DEBUG_FLAG_SELECT_TYPE)
 			info("default LinuxImage %s",
 			     bg_conf->default_linuximage);
 		image = xmalloc(sizeof(image_t));
@@ -833,7 +833,7 @@ extern int read_bg_conf(void)
 	}
 	if (!s_p_get_string(&bg_conf->default_ramdiskimage,
 			    "RamDiskImage", tbl)) {
-		if(!list_count(bg_conf->ramdisk_list))
+		if (!list_count(bg_conf->ramdisk_list))
 			fatal("RamDiskImage not configured "
 			      "in bluegene.conf");
 		itr = list_iterator_create(bg_conf->ramdisk_list);
@@ -845,7 +845,7 @@ extern int read_bg_conf(void)
 		     "If this isn't correct please set RamDiskImage",
 		     bg_conf->default_ramdiskimage);
 	} else {
-		if(bg_conf->slurm_debug_flags & DEBUG_FLAG_SELECT_TYPE)
+		if (bg_conf->slurm_debug_flags & DEBUG_FLAG_SELECT_TYPE)
 			info("default RamDiskImage %s",
 			     bg_conf->default_ramdiskimage);
 		image = xmalloc(sizeof(image_t));
@@ -865,7 +865,7 @@ extern int read_bg_conf(void)
 		}
 	}
 	if (!s_p_get_string(&bg_conf->default_linuximage, "CnloadImage", tbl)) {
-		if(!list_count(bg_conf->linux_list))
+		if (!list_count(bg_conf->linux_list))
 			fatal("CnloadImage not configured "
 			      "in bluegene.conf");
 		itr = list_iterator_create(bg_conf->linux_list);
@@ -877,7 +877,7 @@ extern int read_bg_conf(void)
 		     "If this isn't correct please set CnloadImage",
 		     bg_conf->default_linuximage);
 	} else {
-		if(bg_conf->slurm_debug_flags & DEBUG_FLAG_SELECT_TYPE)
+		if (bg_conf->slurm_debug_flags & DEBUG_FLAG_SELECT_TYPE)
 			info("default CnloadImage %s",
 			     bg_conf->default_linuximage);
 		image = xmalloc(sizeof(image_t));
@@ -897,7 +897,7 @@ extern int read_bg_conf(void)
 	}
 	if (!s_p_get_string(&bg_conf->default_ramdiskimage,
 			    "IoloadImage", tbl)) {
-		if(!list_count(bg_conf->ramdisk_list))
+		if (!list_count(bg_conf->ramdisk_list))
 			fatal("IoloadImage not configured "
 			      "in bluegene.conf");
 		itr = list_iterator_create(bg_conf->ramdisk_list);
@@ -909,7 +909,7 @@ extern int read_bg_conf(void)
 		     "If this isn't correct please set IoloadImage",
 		     bg_conf->default_ramdiskimage);
 	} else {
-		if(bg_conf->slurm_debug_flags & DEBUG_FLAG_SELECT_TYPE)
+		if (bg_conf->slurm_debug_flags & DEBUG_FLAG_SELECT_TYPE)
 			info("default IoloadImage %s",
 			     bg_conf->default_ramdiskimage);
 		image = xmalloc(sizeof(image_t));
@@ -930,7 +930,7 @@ extern int read_bg_conf(void)
 	}
 	if (!s_p_get_string(&bg_conf->default_mloaderimage,
 			    "MloaderImage", tbl)) {
-		if(!list_count(bg_conf->mloader_list))
+		if (!list_count(bg_conf->mloader_list))
 			fatal("MloaderImage not configured "
 			      "in bluegene.conf");
 		itr = list_iterator_create(bg_conf->mloader_list);
@@ -942,7 +942,7 @@ extern int read_bg_conf(void)
 		     "If this isn't correct please set MloaderImage",
 		     bg_conf->default_mloaderimage);
 	} else {
-		if(bg_conf->slurm_debug_flags & DEBUG_FLAG_SELECT_TYPE)
+		if (bg_conf->slurm_debug_flags & DEBUG_FLAG_SELECT_TYPE)
 			info("default MloaderImage %s",
 			     bg_conf->default_mloaderimage);
 		image = xmalloc(sizeof(image_t));
@@ -960,7 +960,7 @@ extern int read_bg_conf(void)
 		bg_conf->bp_node_cnt = 512;
 		bg_conf->quarter_node_cnt = 128;
 	} else {
-		if(bg_conf->bp_node_cnt <= 0)
+		if (bg_conf->bp_node_cnt <= 0)
 			fatal("You should have more than 0 nodes "
 			      "per base partition");
 
@@ -968,7 +968,7 @@ extern int read_bg_conf(void)
 	}
 	/* bg_conf->cpus_per_bp should had already been set from the
 	 * node_init */
-	if(bg_conf->cpus_per_bp < bg_conf->bp_node_cnt) {
+	if (bg_conf->cpus_per_bp < bg_conf->bp_node_cnt) {
 		fatal("For some reason we have only %u cpus per bp, but "
 		      "have %u cnodes per bp.  You need at least the same "
 		      "number of cpus as you have cnodes per bp.  "
@@ -978,7 +978,7 @@ extern int read_bg_conf(void)
 	}
 
 	bg_conf->cpu_ratio = bg_conf->cpus_per_bp/bg_conf->bp_node_cnt;
-	if(!bg_conf->cpu_ratio)
+	if (!bg_conf->cpu_ratio)
 		fatal("We appear to have less than 1 cpu on a cnode.  "
 		      "You specified %u for BasePartitionNodeCnt "
 		      "in the blugene.conf and %u cpus "
@@ -995,7 +995,7 @@ extern int read_bg_conf(void)
 		bg_conf->nodecard_node_cnt = 32;
 	}
 
-	if(bg_conf->nodecard_node_cnt<=0)
+	if (bg_conf->nodecard_node_cnt<=0)
 		fatal("You should have more than 0 nodes per nodecard");
 
 	bg_conf->bp_nodecard_cnt =
@@ -1004,12 +1004,12 @@ extern int read_bg_conf(void)
 	if (!s_p_get_uint16(&bg_conf->numpsets, "Numpsets", tbl))
 		fatal("Warning: Numpsets not configured in bluegene.conf");
 
-	if(bg_conf->numpsets) {
+	if (bg_conf->numpsets) {
 		bitstr_t *tmp_bitmap = NULL;
 		int small_size = 1;
 
 		/* THIS IS A HACK TO MAKE A 1 NODECARD SYSTEM WORK */
-		if(bg_conf->bp_node_cnt == bg_conf->nodecard_node_cnt) {
+		if (bg_conf->bp_node_cnt == bg_conf->nodecard_node_cnt) {
 			bg_conf->quarter_ionode_cnt = 2;
 			bg_conf->nodecard_ionode_cnt = 2;
 		} else {
@@ -1032,20 +1032,20 @@ extern int read_bg_conf(void)
 		/* figure out the smallest block we can have on the
 		   system */
 #ifdef HAVE_BGL
-		if(bg_conf->io_ratio >= 1)
+		if (bg_conf->io_ratio >= 1)
 			bg_conf->smallest_block=32;
 		else
 			bg_conf->smallest_block=128;
 #else
-		if(bg_conf->io_ratio >= 2)
+		if (bg_conf->io_ratio >= 2)
 			bg_conf->smallest_block=16;
-		else if(bg_conf->io_ratio == 1)
+		else if (bg_conf->io_ratio == 1)
 			bg_conf->smallest_block=32;
-		else if(bg_conf->io_ratio == .5)
+		else if (bg_conf->io_ratio == .5)
 			bg_conf->smallest_block=64;
-		else if(bg_conf->io_ratio == .25)
+		else if (bg_conf->io_ratio == .25)
 			bg_conf->smallest_block=128;
-		else if(bg_conf->io_ratio == .125)
+		else if (bg_conf->io_ratio == .125)
 			bg_conf->smallest_block=256;
 		else {
 			error("unknown ioratio %f.  Can't figure out "
@@ -1054,20 +1054,20 @@ extern int read_bg_conf(void)
 			bg_conf->smallest_block = 512;
 		}
 #endif
-		if(bg_conf->slurm_debug_flags & DEBUG_FLAG_SELECT_TYPE)
+		if (bg_conf->slurm_debug_flags & DEBUG_FLAG_SELECT_TYPE)
 			info("Smallest block possible on this system is %u",
 			     bg_conf->smallest_block);
 		/* below we are creating all the possible bitmaps for
 		 * each size of small block
 		 */
-		if((int)bg_conf->nodecard_ionode_cnt < 1) {
+		if ((int)bg_conf->nodecard_ionode_cnt < 1) {
 			bg_conf->nodecard_ionode_cnt = 0;
 		} else {
 			bg_lists->valid_small32 = list_create(_destroy_bitmap);
-			if((small_size = bg_conf->nodecard_ionode_cnt))
+			if ((small_size = bg_conf->nodecard_ionode_cnt))
 				small_size--;
 			i = 0;
-			while(i<bg_conf->numpsets) {
+			while (i<bg_conf->numpsets) {
 				tmp_bitmap = bit_alloc(bg_conf->numpsets);
 				bit_nset(tmp_bitmap, i, i+small_size);
 				i += small_size+1;
@@ -1078,14 +1078,14 @@ extern int read_bg_conf(void)
 		/* If we only have 1 nodecard just jump to the end
 		   since this will never need to happen below.
 		   Pretty much a hack to avoid seg fault;). */
-		if(bg_conf->bp_node_cnt == bg_conf->nodecard_node_cnt)
+		if (bg_conf->bp_node_cnt == bg_conf->nodecard_node_cnt)
 			goto no_calc;
 
 		bg_lists->valid_small128 = list_create(_destroy_bitmap);
-		if((small_size = bg_conf->quarter_ionode_cnt))
+		if ((small_size = bg_conf->quarter_ionode_cnt))
 			small_size--;
 		i = 0;
-		while(i<bg_conf->numpsets) {
+		while (i<bg_conf->numpsets) {
 			tmp_bitmap = bit_alloc(bg_conf->numpsets);
 			bit_nset(tmp_bitmap, i, i+small_size);
 			i += small_size+1;
@@ -1094,10 +1094,10 @@ extern int read_bg_conf(void)
 
 #ifndef HAVE_BGL
 		bg_lists->valid_small64 = list_create(_destroy_bitmap);
-		if((small_size = bg_conf->nodecard_ionode_cnt * 2))
+		if ((small_size = bg_conf->nodecard_ionode_cnt * 2))
 			small_size--;
 		i = 0;
-		while(i<bg_conf->numpsets) {
+		while (i<bg_conf->numpsets) {
 			tmp_bitmap = bit_alloc(bg_conf->numpsets);
 			bit_nset(tmp_bitmap, i, i+small_size);
 			i += small_size+1;
@@ -1105,10 +1105,10 @@ extern int read_bg_conf(void)
 		}
 
 		bg_lists->valid_small256 = list_create(_destroy_bitmap);
-		if((small_size = bg_conf->quarter_ionode_cnt * 2))
+		if ((small_size = bg_conf->quarter_ionode_cnt * 2))
 			small_size--;
 		i = 0;
-		while(i<bg_conf->numpsets) {
+		while (i<bg_conf->numpsets) {
 			tmp_bitmap = bit_alloc(bg_conf->numpsets);
 			bit_nset(tmp_bitmap, i, i+small_size);
 			i += small_size+1;
@@ -1131,13 +1131,13 @@ no_calc:
 		_reopen_bridge_log();
 
 	if (s_p_get_string(&layout, "DenyPassthrough", tbl)) {
-		if(strstr(layout, "X"))
+		if (strstr(layout, "X"))
 			ba_deny_pass |= PASS_DENY_X;
-		if(strstr(layout, "Y"))
+		if (strstr(layout, "Y"))
 			ba_deny_pass |= PASS_DENY_Y;
-		if(strstr(layout, "Z"))
+		if (strstr(layout, "Z"))
 			ba_deny_pass |= PASS_DENY_Z;
-		if(!strcasecmp(layout, "ALL"))
+		if (!strcasecmp(layout, "ALL"))
 			ba_deny_pass |= PASS_DENY_ALL;
 		bg_conf->deny_pass = ba_deny_pass;
 		xfree(layout);
@@ -1148,11 +1148,11 @@ no_calc:
 		     "defaulting to STATIC partitioning");
 		bg_conf->layout_mode = LAYOUT_STATIC;
 	} else {
-		if(!strcasecmp(layout,"STATIC"))
+		if (!strcasecmp(layout,"STATIC"))
 			bg_conf->layout_mode = LAYOUT_STATIC;
-		else if(!strcasecmp(layout,"OVERLAP"))
+		else if (!strcasecmp(layout,"OVERLAP"))
 			bg_conf->layout_mode = LAYOUT_OVERLAP;
-		else if(!strcasecmp(layout,"DYNAMIC"))
+		else if (!strcasecmp(layout,"DYNAMIC"))
 			bg_conf->layout_mode = LAYOUT_DYNAMIC;
 		else {
 			fatal("I don't understand this LayoutMode = %s",
@@ -1162,7 +1162,7 @@ no_calc:
 	}
 
 	/* add blocks defined in file */
-	if(bg_conf->layout_mode != LAYOUT_DYNAMIC) {
+	if (bg_conf->layout_mode != LAYOUT_DYNAMIC) {
 		if (!s_p_get_array((void ***)&blockreq_array,
 				   &count, "BPs", tbl)) {
 			info("WARNING: no blocks defined in bluegene.conf, "
@@ -1190,7 +1190,7 @@ extern int validate_current_blocks(char *dir)
 	bg_record_t *bg_record = NULL;
 
 	/* only run on startup */
-	if(last_config_update)
+	if (last_config_update)
 		return SLURM_SUCCESS;
 
 	last_config_update = time(NULL);
@@ -1204,7 +1204,7 @@ extern int validate_current_blocks(char *dir)
 	}
 //#endif
 	/* looking for blocks only I created */
-	if(bg_conf->layout_mode == LAYOUT_DYNAMIC) {
+	if (bg_conf->layout_mode == LAYOUT_DYNAMIC) {
 		init_wires();
 		info("No blocks created until jobs are submitted");
 	} else {
@@ -1225,8 +1225,8 @@ extern int validate_current_blocks(char *dir)
 	   it doesn't matter much in the first place though since
 	   no threads are started before this function. */
 	itr = list_iterator_create(bg_lists->main);
-	while((bg_record = list_next(itr))) {
-		if(bg_record->state == RM_PARTITION_ERROR)
+	while ((bg_record = list_next(itr))) {
+		if (bg_record->state == RM_PARTITION_ERROR)
 			put_block_in_error_state(bg_record,
 						 BLOCK_ERROR_STATE, NULL);
 	}
@@ -1241,14 +1241,14 @@ extern int validate_current_blocks(char *dir)
 	last_bg_update = time(NULL);
 	sort_bg_record_inc_size(bg_lists->main);
 	slurm_mutex_unlock(&block_state_mutex);
-	if(bg_conf->slurm_debug_flags & DEBUG_FLAG_SELECT_TYPE)
+	if (bg_conf->slurm_debug_flags & DEBUG_FLAG_SELECT_TYPE)
 		info("Blocks have finished being created.");
 	return SLURM_SUCCESS;
 }
 
 static void _destroy_bg_config(bg_config_t *bg_conf)
 {
-	if(bg_conf) {
+	if (bg_conf) {
 #ifdef HAVE_BGL
 		if (bg_conf->blrts_list) {
 			list_destroy(bg_conf->blrts_list);
@@ -1282,7 +1282,7 @@ static void _destroy_bg_config(bg_config_t *bg_conf)
 
 static void _destroy_bg_lists(bg_lists_t *bg_lists)
 {
-	if(bg_lists) {
+	if (bg_lists) {
 		if (bg_lists->booted) {
 			list_destroy(bg_lists->booted);
 			bg_lists->booted = NULL;
@@ -1440,8 +1440,8 @@ static int _validate_config_nodes(List curr_block_list,
 			     conn_type_string(bg_record->conn_type));
 			if (((bg_record->state == RM_PARTITION_READY)
 			     || (bg_record->state == RM_PARTITION_CONFIGURING))
-			   && !block_ptr_exist_in_list(bg_lists->booted,
-						       bg_record))
+			    && !block_ptr_exist_in_list(bg_lists->booted,
+							bg_record))
 				list_push(bg_lists->booted, bg_record);
 		}
 	}
@@ -1465,8 +1465,8 @@ static int _validate_config_nodes(List curr_block_list,
 				if (((bg_record->state == RM_PARTITION_READY)
 				     || (bg_record->state
 					 == RM_PARTITION_CONFIGURING))
-				   && !block_ptr_exist_in_list(
-					   bg_lists->booted, bg_record))
+				    && !block_ptr_exist_in_list(
+					    bg_lists->booted, bg_record))
 					list_push(bg_lists->booted,
 						  bg_record);
 				break;
@@ -1512,7 +1512,7 @@ static int _delete_old_blocks(List curr_block_list, List found_block_list)
 			}
 			list_iterator_destroy(itr_found);
 
-			if(found_record == NULL) {
+			if (found_record == NULL) {
 				list_remove(itr_curr);
 				list_push(destroy_list, init_record);
 			}
@@ -1671,7 +1671,7 @@ static int _reopen_bridge_log(void)
 	rc = bridge_set_log_params(bg_conf->bridge_api_file,
 				   bg_conf->bridge_api_verb);
 #endif
-	if(bg_conf->slurm_debug_flags & DEBUG_FLAG_SELECT_TYPE)
+	if (bg_conf->slurm_debug_flags & DEBUG_FLAG_SELECT_TYPE)
 		info("Bridge api file set to %s, verbose level %d",
 		     bg_conf->bridge_api_file, bg_conf->bridge_api_verb);
 
@@ -1682,7 +1682,7 @@ static void _destroy_bitmap(void *object)
 {
 	bitstr_t *bitstr = (bitstr_t *)object;
 
-	if(bitstr) {
+	if (bitstr) {
 		FREE_NULL_BITMAP(bitstr);
 	}
 }
diff --git a/src/plugins/select/bluegene/plugin/defined_block.c b/src/plugins/select/bluegene/plugin/defined_block.c
index 20bc7ded8ee15b0679007d24d0217ea2956cc221..79734d3f17646b0ed78bff179fc77a127862941b 100644
--- a/src/plugins/select/bluegene/plugin/defined_block.c
+++ b/src/plugins/select/bluegene/plugin/defined_block.c
@@ -73,7 +73,7 @@ extern int create_defined_blocks(bg_layout_t overlapped,
 		/* we only want to use bps that are in
 		 * partitions
 		 */
-		if(!part_ptr->node_bitmap) {
+		if (!part_ptr->node_bitmap) {
 			debug4("Partition %s doesn't have any nodes in it.",
 			       part_ptr->name);
 			continue;
@@ -83,7 +83,7 @@ extern int create_defined_blocks(bg_layout_t overlapped,
 	list_iterator_destroy(itr);
 
 	bit_not(bitmap);
-	if(bit_ffs(bitmap) != -1) {
+	if (bit_ffs(bitmap) != -1) {
 		fatal("We don't have any nodes in any partitions.  "
 		      "Can't create blocks.  "
 		      "Please check your slurm.conf.");
@@ -94,10 +94,10 @@ extern int create_defined_blocks(bg_layout_t overlapped,
 
 	slurm_mutex_lock(&block_state_mutex);
 	reset_ba_system(false);
-	if(bg_lists->main) {
+	if (bg_lists->main) {
 		itr = list_iterator_create(bg_lists->main);
-		while((bg_record = list_next(itr))) {
-			if(bg_found_block_list) {
+		while ((bg_record = list_next(itr))) {
+			if (bg_found_block_list) {
 				itr_found = list_iterator_create(
 					bg_found_block_list);
 				while ((found_record = (bg_record_t*)
@@ -124,12 +124,12 @@ extern int create_defined_blocks(bg_layout_t overlapped,
 				error("create_defined_blocks: "
 				      "no bg_found_block_list 1");
 			}
-			if(bg_record->bp_count > 0
-			   && !bg_record->full_block
-			   && bg_record->cpu_cnt >= bg_conf->cpus_per_bp) {
+			if (bg_record->bp_count > 0
+			    && !bg_record->full_block
+			    && bg_record->cpu_cnt >= bg_conf->cpus_per_bp) {
 				char *name = NULL;
 
-				if(overlapped == LAYOUT_OVERLAP) {
+				if (overlapped == LAYOUT_OVERLAP) {
 					reset_ba_system(false);
 					removable_set_bps(non_usable_nodes);
 				}
@@ -137,8 +137,8 @@ extern int create_defined_blocks(bg_layout_t overlapped,
 				/* we want the bps that aren't
 				 * in this record to mark them as used
 				 */
-				if(set_all_bps_except(bg_record->nodes)
-				   != SLURM_SUCCESS)
+				if (set_all_bps_except(bg_record->nodes)
+				    != SLURM_SUCCESS)
 					fatal("something happened in "
 					      "the load of %s.  "
 					      "Did you use smap to "
@@ -156,11 +156,11 @@ extern int create_defined_blocks(bg_layout_t overlapped,
 				       alpha_num[geo[X]],
 				       alpha_num[geo[Y]],
 				       alpha_num[geo[Z]]);
-				if(bg_record->bg_block_list
-				   && list_count(bg_record->bg_block_list)) {
-					if(check_and_set_node_list(
-						   bg_record->bg_block_list)
-					   == SLURM_ERROR) {
+				if (bg_record->bg_block_list
+				    && list_count(bg_record->bg_block_list)) {
+					if (check_and_set_node_list(
+						    bg_record->bg_block_list)
+					    == SLURM_ERROR) {
 						debug2("something happened in "
 						       "the load of %s"
 						       "Did you use smap to "
@@ -182,7 +182,7 @@ extern int create_defined_blocks(bg_layout_t overlapped,
 						geo,
 						bg_record->conn_type);
 					reset_all_removed_bps();
-					if(!name) {
+					if (!name) {
 						error("I was unable to "
 						      "make the "
 						      "requested block.");
@@ -199,7 +199,7 @@ extern int create_defined_blocks(bg_layout_t overlapped,
 						 name);
 
 					xfree(name);
-					if(strcmp(temp, bg_record->nodes)) {
+					if (strcmp(temp, bg_record->nodes)) {
 						fatal("given list of %s "
 						      "but allocated %s, "
 						      "your order might be "
@@ -207,7 +207,7 @@ extern int create_defined_blocks(bg_layout_t overlapped,
 						      bg_record->nodes,
 						      temp);
 					}
-					if(bg_record->bg_block_list)
+					if (bg_record->bg_block_list)
 						list_destroy(bg_record->
 							     bg_block_list);
 					bg_record->bg_block_list =
@@ -218,8 +218,8 @@ extern int create_defined_blocks(bg_layout_t overlapped,
 					list_destroy(results);
 				}
 			}
-			if(found_record == NULL) {
-				if(bg_record->full_block) {
+			if (found_record == NULL) {
+				if (bg_record->full_block) {
 					/* if this is defined we need
 					   to remove it since we are
 					   going to try to create it
@@ -235,8 +235,8 @@ extern int create_defined_blocks(bg_layout_t overlapped,
 					list_remove(itr);
 					continue;
 				}
-				if((rc = configure_block(bg_record))
-				   == SLURM_ERROR) {
+				if ((rc = configure_block(bg_record))
+				    == SLURM_ERROR) {
 					list_iterator_destroy(itr);
 					slurm_mutex_unlock(&block_state_mutex);
 					xfree(non_usable_nodes);
@@ -262,7 +262,7 @@ extern int create_defined_blocks(bg_layout_t overlapped,
 	slurm_mutex_unlock(&block_state_mutex);
 
 #ifdef _PRINT_BLOCKS_AND_EXIT
-	if(bg_lists->main) {
+	if (bg_lists->main) {
 		itr = list_iterator_create(bg_lists->main);
 		debug("\n\n");
 		while ((found_record = (bg_record_t *) list_next(itr))
@@ -300,7 +300,7 @@ extern int create_full_system_block(List bg_found_block_list)
 		/* we only want to use bps that are in
 		 * partitions
 		 */
-		if(!part_ptr->node_bitmap) {
+		if (!part_ptr->node_bitmap) {
 			debug4("Partition %s doesn't have any nodes in it.",
 			       part_ptr->name);
 			continue;
@@ -310,7 +310,7 @@ extern int create_full_system_block(List bg_found_block_list)
 	list_iterator_destroy(itr);
 
 	bit_not(bitmap);
-	if(bit_ffs(bitmap) != -1) {
+	if (bit_ffs(bitmap) != -1) {
 		error("We don't have the entire system covered by partitions, "
 		      "can't create full system block");
 		FREE_NULL_BITMAP(bitmap);
@@ -329,7 +329,7 @@ extern int create_full_system_block(List bg_found_block_list)
 
 	i = (10+strlen(bg_conf->slurm_node_prefix));
 	name = xmalloc(i);
-	if((geo[X] == 0) && (geo[Y] == 0) && (geo[Z] == 0))
+	if ((geo[X] == 0) && (geo[Y] == 0) && (geo[Z] == 0))
 		snprintf(name, i, "%s000",
 			 bg_conf->slurm_node_prefix);
 	else
@@ -339,7 +339,7 @@ extern int create_full_system_block(List bg_found_block_list)
 			 alpha_num[geo[Z]]);
 
 
-	if(bg_found_block_list) {
+	if (bg_found_block_list) {
 		itr = list_iterator_create(bg_found_block_list);
 		while ((bg_record = (bg_record_t *) list_next(itr)) != NULL) {
 			if (!strcmp(name, bg_record->nodes)) {
@@ -354,7 +354,7 @@ extern int create_full_system_block(List bg_found_block_list)
 		error("create_full_system_block: no bg_found_block_list 2");
 	}
 
-	if(bg_lists->main) {
+	if (bg_lists->main) {
 		itr = list_iterator_create(bg_lists->main);
 		while ((bg_record = (bg_record_t *) list_next(itr))
 		       != NULL) {
@@ -383,7 +383,7 @@ extern int create_full_system_block(List bg_found_block_list)
 	xfree(name);
 
 	bg_record = (bg_record_t *) list_pop(records);
-	if(!bg_record) {
+	if (!bg_record) {
 		error("Nothing was returned from full system create");
 		rc = SLURM_ERROR;
 		goto no_total;
@@ -404,7 +404,7 @@ extern int create_full_system_block(List bg_found_block_list)
 			    bg_record->start,
 			    geo,
 			    bg_record->conn_type);
-	if(!name) {
+	if (!name) {
 		error("I was unable to make the full system block.");
 		list_destroy(results);
 		list_iterator_destroy(itr);
@@ -412,13 +412,13 @@ extern int create_full_system_block(List bg_found_block_list)
 		return SLURM_ERROR;
 	}
 	xfree(name);
-	if(bg_record->bg_block_list)
+	if (bg_record->bg_block_list)
 		list_destroy(bg_record->bg_block_list);
 	bg_record->bg_block_list = list_create(destroy_ba_node);
 	copy_node_path(results, &bg_record->bg_block_list);
 	list_destroy(results);
 
-	if((rc = configure_block(bg_record)) == SLURM_ERROR) {
+	if ((rc = configure_block(bg_record)) == SLURM_ERROR) {
 		error("create_full_system_block: "
 		      "unable to configure block in api");
 		destroy_bg_record(bg_record);
@@ -429,7 +429,7 @@ extern int create_full_system_block(List bg_found_block_list)
 	list_append(bg_lists->main, bg_record);
 
 no_total:
-	if(records)
+	if (records)
 		list_destroy(records);
 	slurm_mutex_unlock(&block_state_mutex);
 	return rc;
diff --git a/src/plugins/select/bluegene/plugin/dynamic_block.c b/src/plugins/select/bluegene/plugin/dynamic_block.c
index 628ffa1d35ba272036bcd4a3aa7ec2a78b2ddae4..e9dd3210dd3ea7fe3582c1c334d01830e26b8bad 100644
--- a/src/plugins/select/bluegene/plugin/dynamic_block.c
+++ b/src/plugins/select/bluegene/plugin/dynamic_block.c
@@ -66,7 +66,7 @@ extern List create_dynamic_block(List block_list,
 	int cnodes = request->procs / bg_conf->cpu_ratio;
 	char *unusable_nodes = NULL;
 
-	if(cnodes < bg_conf->smallest_block) {
+	if (cnodes < bg_conf->smallest_block) {
 		error("Can't create this size %d "
 		      "on this system numpsets is %d",
 		      request->procs,
@@ -76,13 +76,13 @@ extern List create_dynamic_block(List block_list,
 	memset(&blockreq, 0, sizeof(blockreq_t));
 
 	slurm_mutex_lock(&block_state_mutex);
-	if(my_block_list) {
+	if (my_block_list) {
 		reset_ba_system(track_down_nodes);
 		itr = list_iterator_create(my_block_list);
 		while ((bg_record = list_next(itr))) {
 			if (bg_record->free_cnt) {
-				if(bg_conf->slurm_debug_flags
-				   & DEBUG_FLAG_BG_PICK) {
+				if (bg_conf->slurm_debug_flags
+				    & DEBUG_FLAG_BG_PICK) {
 					char *start_geo = give_geo(
 						bg_record->start);
 					char *geo = give_geo(bg_record->geo);
@@ -107,11 +107,11 @@ extern List create_dynamic_block(List block_list,
 					bit_alloc(bit_size(bg_record->bitmap));
 			}
 
-			if(!bit_super_set(bg_record->bitmap, my_bitmap)) {
+			if (!bit_super_set(bg_record->bitmap, my_bitmap)) {
 				bit_or(my_bitmap, bg_record->bitmap);
 
-				if(bg_conf->slurm_debug_flags
-				   & DEBUG_FLAG_BG_PICK) {
+				if (bg_conf->slurm_debug_flags
+				    & DEBUG_FLAG_BG_PICK) {
 					char *start_geo =
 						give_geo(bg_record->start);
 					char *geo =
@@ -127,11 +127,11 @@ extern List create_dynamic_block(List block_list,
 					xfree(start_geo);
 					xfree(geo);
 				}
-				if(check_and_set_node_list(
-					   bg_record->bg_block_list)
-				   == SLURM_ERROR) {
-					if(bg_conf->slurm_debug_flags
-					   & DEBUG_FLAG_BG_PICK)
+				if (check_and_set_node_list(
+					    bg_record->bg_block_list)
+				    == SLURM_ERROR) {
+					if (bg_conf->slurm_debug_flags
+					    & DEBUG_FLAG_BG_PICK)
 						info("something happened in "
 						     "the load of %s",
 						     bg_record->bg_block_id);
@@ -140,8 +140,8 @@ extern List create_dynamic_block(List block_list,
 					rc = SLURM_ERROR;
 					goto finished;
 				}
-			} else if(bg_conf->slurm_debug_flags
-				  & DEBUG_FLAG_BG_PICK) {
+			} else if (bg_conf->slurm_debug_flags
+				   & DEBUG_FLAG_BG_PICK) {
 				char *start_geo = give_geo(bg_record->start);
 				char *geo = give_geo(bg_record->geo);
 
@@ -161,11 +161,11 @@ extern List create_dynamic_block(List block_list,
 		FREE_NULL_BITMAP(my_bitmap);
 	} else {
 		reset_ba_system(false);
-		if(bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
+		if (bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
 			info("No list was given");
 	}
 
-	if(request->avail_node_bitmap) {
+	if (request->avail_node_bitmap) {
 		bitstr_t *bitmap = bit_alloc(node_record_count);
 
 		/* we want the bps that aren't in this partition to
@@ -181,7 +181,7 @@ extern List create_dynamic_block(List block_list,
 		FREE_NULL_BITMAP(bitmap);
 	}
 
-	if(request->size==1 && cnodes < bg_conf->bp_node_cnt) {
+	if (request->size==1 && cnodes < bg_conf->bp_node_cnt) {
 		switch(cnodes) {
 #ifdef HAVE_BGL
 		case 32:
@@ -230,47 +230,47 @@ extern List create_dynamic_block(List block_list,
 		request->conn_type = SELECT_SMALL;
 		new_blocks = list_create(destroy_bg_record);
 		/* check only blocks that are free and small */
-		if(_breakup_blocks(block_list, new_blocks,
-				   request, my_block_list,
-				   true, true)
-		   == SLURM_SUCCESS)
+		if (_breakup_blocks(block_list, new_blocks,
+				    request, my_block_list,
+				    true, true)
+		    == SLURM_SUCCESS)
 			goto finished;
 
 		/* check only blocks that are free and any size */
-		if(_breakup_blocks(block_list, new_blocks,
-				   request, my_block_list,
-				   true, false)
-		   == SLURM_SUCCESS)
+		if (_breakup_blocks(block_list, new_blocks,
+				    request, my_block_list,
+				    true, false)
+		    == SLURM_SUCCESS)
 			goto finished;
 
 		/* check usable blocks that are small with any state */
-		if(_breakup_blocks(block_list, new_blocks,
-				   request, my_block_list,
-				   false, true)
-		   == SLURM_SUCCESS)
+		if (_breakup_blocks(block_list, new_blocks,
+				    request, my_block_list,
+				    false, true)
+		    == SLURM_SUCCESS)
 			goto finished;
 
 		/* check all usable blocks */
-		if(_breakup_blocks(block_list, new_blocks,
-				   request, my_block_list,
-				   false, false)
-		   == SLURM_SUCCESS)
+		if (_breakup_blocks(block_list, new_blocks,
+				    request, my_block_list,
+				    false, false)
+		    == SLURM_SUCCESS)
 			goto finished;
 
 		/* Re-sort the list back to the original order. */
 		list_sort(block_list, (ListCmpF)bg_record_sort_aval_inc);
 		list_destroy(new_blocks);
 		new_blocks = NULL;
-		if(bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
+		if (bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
 			info("small block not able to be placed inside others");
 	}
 
-	if(request->conn_type == SELECT_NAV)
+	if (request->conn_type == SELECT_NAV)
 		request->conn_type = SELECT_TORUS;
 
 	//debug("going to create %d", request->size);
-	if(!new_ba_request(request)) {
-		if(request->geometry[X] != (uint16_t)NO_VAL) {
+	if (!new_ba_request(request)) {
+		if (request->geometry[X] != (uint16_t)NO_VAL) {
 			char *geo = give_geo(request->geometry);
 			error("Problems with request for size %d geo %s",
 			      request->size, geo);
@@ -286,7 +286,7 @@ extern List create_dynamic_block(List block_list,
 
 	/* try on free midplanes */
 	rc = SLURM_SUCCESS;
-	if(results)
+	if (results)
 		list_flush(results);
 	else
 		results = list_create(NULL);
@@ -294,20 +294,20 @@ extern List create_dynamic_block(List block_list,
 	if (allocate_block(request, results))
 		goto setup_records;
 
-	if(bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
+	if (bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
 		info("allocate failure for size %d base "
 		     "partitions of free midplanes",
 		     request->size);
 	rc = SLURM_ERROR;
 
-	if(!list_count(block_list) || !my_block_list)
+	if (!list_count(block_list) || !my_block_list)
 		goto finished;
 
 	/*Try to put block starting in the smallest of the exisiting blocks*/
 	itr = list_iterator_create(block_list);
 	while ((bg_record = (bg_record_t *) list_next(itr)) != NULL) {
 		/* never check a block with a job running */
-		if(bg_record->job_running != NO_JOB_RUNNING)
+		if (bg_record->job_running != NO_JOB_RUNNING)
 			continue;
 
 		/* Here we are only looking for the first
@@ -316,11 +316,11 @@ extern List create_dynamic_block(List block_list,
 		   bg_conf->bp_node_cnt or the first bit is
 		   set in the ionode_bitmap.
 		*/
-		if((bg_record->node_cnt < bg_conf->bp_node_cnt)
-		   && (bit_ffs(bg_record->ionode_bitmap) != 0))
+		if ((bg_record->node_cnt < bg_conf->bp_node_cnt)
+		    && (bit_ffs(bg_record->ionode_bitmap) != 0))
 			continue;
 
-		if(bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
+		if (bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
 			info("removing %s for request %d",
 			     bg_record->nodes, request->size);
 		remove_block(bg_record->bg_block_list, (int)NO_VAL,
@@ -329,14 +329,14 @@ extern List create_dynamic_block(List block_list,
 		   used */
 		removable_set_bps(unusable_nodes);
 		rc = SLURM_SUCCESS;
-		if(results)
+		if (results)
 			list_flush(results);
 		else
 			results = list_create(NULL);
 		if (allocate_block(request, results))
 			break;
 
-		if(bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
+		if (bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
 			info("allocate failure for size %d base partitions",
 			     request->size);
 		rc = SLURM_ERROR;
@@ -344,7 +344,7 @@ extern List create_dynamic_block(List block_list,
 	list_iterator_destroy(itr);
 
 setup_records:
-	if(rc == SLURM_SUCCESS) {
+	if (rc == SLURM_SUCCESS) {
 		/*set up bg_record(s) here */
 		new_blocks = list_create(destroy_bg_record);
 
@@ -366,11 +366,11 @@ finished:
 	xfree(unusable_nodes);
 	xfree(request->save_name);
 
-	if(request->elongate_geos) {
+	if (request->elongate_geos) {
 		list_destroy(request->elongate_geos);
 		request->elongate_geos = NULL;
 	}
-	if(results)
+	if (results)
 		list_destroy(results);
 	errno = rc;
 	slurm_mutex_unlock(&block_state_mutex);
@@ -393,10 +393,10 @@ extern bg_record_t *create_small_record(bg_record_t *bg_record,
 	found_record->user_name = xstrdup(bg_record->user_name);
 	found_record->user_uid = bg_record->user_uid;
 	found_record->bg_block_list = list_create(destroy_ba_node);
-	if(bg_record->bg_block_list)
+	if (bg_record->bg_block_list)
 		ba_node = list_peek(bg_record->bg_block_list);
-	if(!ba_node) {
-		if(bg_record->nodes) {
+	if (!ba_node) {
+		if (bg_record->nodes) {
 			hostlist_t hl = hostlist_create(bg_record->nodes);
 			char *host = hostlist_shift(hl);
 			hostlist_destroy(hl);
@@ -421,8 +421,8 @@ extern bg_record_t *create_small_record(bg_record_t *bg_record,
 		for (i=0; i<SYSTEM_DIMENSIONS; i++){
 			for(j=0;j<NUM_PORTS_PER_NODE;j++) {
 				ba_node->axis_switch[i].int_wire[j].used = 0;
-				if(i!=X) {
-					if(j==3 || j==4)
+				if (i!=X) {
+					if (j==3 || j==4)
 						ba_node->axis_switch[i].
 							int_wire[j].
 							used = 1;
@@ -459,7 +459,7 @@ extern bg_record_t *create_small_record(bg_record_t *bg_record,
 	found_record->ionode_bitmap = bit_copy(ionodes);
 	bit_fmt(bitstring, BITSIZE, found_record->ionode_bitmap);
 	found_record->ionodes = xstrdup(bitstring);
-	if(bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
+	if (bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
 		info("made small block of %s[%s]",
 		     found_record->nodes, found_record->ionodes);
 	return found_record;
@@ -630,19 +630,19 @@ static int _split_block(List block_list, List new_blocks,
 #endif
 	}
 
-	if(!full_bp && bg_record->ionode_bitmap) {
-		if((start = bit_ffs(bg_record->ionode_bitmap)) == -1)
+	if (!full_bp && bg_record->ionode_bitmap) {
+		if ((start = bit_ffs(bg_record->ionode_bitmap)) == -1)
 			start = 0;
 	}
 
 #ifdef HAVE_BGL
-	if(bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
+	if (bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
 		info("Asking for %u 32CNBlocks, and %u 128CNBlocks "
 		     "from a %u block, starting at ionode %d.",
 		     blockreq.small32, blockreq.small128,
 		     bg_record->node_cnt, start);
 #else
-	if(bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
+	if (bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
 		info("Asking for %u 16CNBlocks, %u 32CNBlocks, "
 		     "%u 64CNBlocks, %u 128CNBlocks, and %u 256CNBlocks "
 		     "from a %u block, starting at ionode %d.",
@@ -669,7 +669,7 @@ static int _breakup_blocks(List block_list, List new_blocks,
 	int cnodes = request->procs / bg_conf->cpu_ratio;
 	int curr_bp_bit = -1;
 
-	if(bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
+	if (bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
 		info("cpu_count=%d cnodes=%d o_free=%d o_small=%d",
 		     request->procs, cnodes, only_free, only_small);
 
@@ -701,37 +701,37 @@ static int _breakup_blocks(List block_list, List new_blocks,
 	itr = list_iterator_create(block_list);
 	while ((bg_record = list_next(itr))) {
 		if (bg_record->free_cnt) {
-			if(bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
+			if (bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
 				info("%s being free for other job(s), skipping",
 				     bg_record->bg_block_id);
 			continue;
 		}
 		/* never look at a block if a job is running */
-		if(bg_record->job_running != NO_JOB_RUNNING)
+		if (bg_record->job_running != NO_JOB_RUNNING)
 			continue;
 		/* on the third time through look for just a block
 		 * that isn't used */
 
 		/* check for free blocks on the first and second time */
-		if(only_free && (bg_record->state != RM_PARTITION_FREE))
+		if (only_free && (bg_record->state != RM_PARTITION_FREE))
 			continue;
 
 		/* check small blocks first */
-		if(only_small && (bg_record->node_cnt > bg_conf->bp_node_cnt))
+		if (only_small && (bg_record->node_cnt > bg_conf->bp_node_cnt))
 			continue;
 
 		if (request->avail_node_bitmap &&
 		    !bit_super_set(bg_record->bitmap,
 				   request->avail_node_bitmap)) {
-			if(bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
+			if (bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
 				info("bg block %s has nodes not usable "
 				     "by this job",
 				     bg_record->bg_block_id);
 			continue;
 		}
 
-		if(bg_record->node_cnt == cnodes) {
-			if(bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
+		if (bg_record->node_cnt == cnodes) {
+			if (bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
 				info("found it here %s, %s",
 				     bg_record->bg_block_id,
 				     bg_record->nodes);
@@ -745,14 +745,14 @@ static int _breakup_blocks(List block_list, List new_blocks,
 			goto finished;
 		}
 		/* lets see if we can combine some small ones */
-		if(bg_record->node_cnt < cnodes) {
+		if (bg_record->node_cnt < cnodes) {
 			char bitstring[BITSIZE];
 			bitstr_t *bitstr = NULL;
 			int num_over = 0;
 			int num_cnodes = bg_record->node_cnt;
 			int rec_bp_bit = bit_ffs(bg_record->bitmap);
 
-			if(curr_bp_bit != rec_bp_bit) {
+			if (curr_bp_bit != rec_bp_bit) {
 				/* Got a different node than
 				 * previously, since the list should
 				 * be in order of nodes for small blocks
@@ -767,29 +767,29 @@ static int _breakup_blocks(List block_list, List new_blocks,
 			   overlapping blocks here.  If that is the
 			   case only add that which doesn't overlap.
 			*/
-			if((num_over = bit_overlap(
-				    ionodes, bg_record->ionode_bitmap))) {
+			if ((num_over = bit_overlap(
+				     ionodes, bg_record->ionode_bitmap))) {
 				/* Since the smallest block size is
 				   the number of cnodes in an io node,
 				   just multiply the num_over by that to
 				   get the number of cnodes to remove.
 				*/
-				if((num_cnodes -=
-				    num_over * bg_conf->smallest_block) <= 0)
+				if ((num_cnodes -=
+				     num_over * bg_conf->smallest_block) <= 0)
 					continue;
 			}
 			bit_or(ionodes, bg_record->ionode_bitmap);
 
 			/* check and see if the bits set are a valid
 			   combo */
-			if(bit_itr) {
-				while((bitstr = list_next(bit_itr))) {
-					if(bit_super_set(ionodes, bitstr))
+			if (bit_itr) {
+				while ((bitstr = list_next(bit_itr))) {
+					if (bit_super_set(ionodes, bitstr))
 						break;
 				}
 				list_iterator_reset(bit_itr);
 			}
-			if(!bitstr) {
+			if (!bitstr) {
 				bit_nclear(ionodes, 0, (bg_conf->numpsets-1));
 				bit_or(ionodes, bg_record->ionode_bitmap);
 				total_cnode_cnt = num_cnodes =
@@ -798,19 +798,19 @@ static int _breakup_blocks(List block_list, List new_blocks,
 				total_cnode_cnt += num_cnodes;
 
 			bit_fmt(bitstring, BITSIZE, ionodes);
-			if(bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
+			if (bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
 				info("combine adding %s %s %d got %d set "
 				     "ionodes %s total is %s",
 				     bg_record->bg_block_id, bg_record->nodes,
 				     num_cnodes, total_cnode_cnt,
 				     bg_record->ionodes, bitstring);
-			if(total_cnode_cnt == cnodes) {
+			if (total_cnode_cnt == cnodes) {
 				request->save_name = xstrdup_printf(
 					"%c%c%c",
 					alpha_num[bg_record->start[X]],
 					alpha_num[bg_record->start[Y]],
 					alpha_num[bg_record->start[Z]]);
-				if(!my_block_list) {
+				if (!my_block_list) {
 					rc = SLURM_SUCCESS;
 					goto finished;
 				}
@@ -829,19 +829,19 @@ static int _breakup_blocks(List block_list, List new_blocks,
 		break;
 	}
 
-	if(bg_record) {
+	if (bg_record) {
 		/* It appears we don't need this original record
 		 * anymore, just work off the copy if indeed it is a copy. */
 
 		/* bg_record_t *found_record = NULL; */
 
-		/* if(bg_record->original) { */
-		/* 	if(bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK) */
+		/* if (bg_record->original) { */
+		/* 	if (bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK) */
 		/* 		info("1 This was a copy %s", */
 		/* 		     bg_record->bg_block_id); */
 		/* 	found_record = bg_record->original; */
 		/* } else { */
-		/* 	if(bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK) */
+		/* 	if (bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK) */
 		/* 		info("looking for original"); */
 		/* 	found_record = find_org_in_bg_list( */
 		/* 		bg_lists->main, bg_record); */
@@ -852,16 +852,16 @@ static int _breakup_blocks(List block_list, List new_blocks,
 			info("This record %s has bad magic, it must be "
 			     "getting freed.  No worries it will all be "
 			     "figured out later.",
-			      bg_record->bg_block_id);
+			     bg_record->bg_block_id);
 		}
 
-		/* if(!found_record || found_record->magic != BLOCK_MAGIC) { */
+		/* if (!found_record || found_record->magic != BLOCK_MAGIC) { */
 		/* 	error("this record wasn't found in the list!"); */
 		/* 	rc = SLURM_ERROR; */
 		/* 	goto finished; */
 		/* } */
 
-		if(bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK) {
+		if (bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK) {
 			format_node_name(bg_record, tmp_char,
 					 sizeof(tmp_char));
 			info("going to split %s, %s",
@@ -873,7 +873,7 @@ static int _breakup_blocks(List block_list, List new_blocks,
 			alpha_num[bg_record->start[X]],
 			alpha_num[bg_record->start[Y]],
 			alpha_num[bg_record->start[Z]]);
-		if(!my_block_list) {
+		if (!my_block_list) {
 			rc = SLURM_SUCCESS;
 			goto finished;
 		}
@@ -883,11 +883,11 @@ static int _breakup_blocks(List block_list, List new_blocks,
 	}
 
 finished:
-	if(bit_itr)
+	if (bit_itr)
 		list_iterator_destroy(bit_itr);
 
 	FREE_NULL_BITMAP(ionodes);
-	if(itr)
+	if (itr)
 		list_iterator_destroy(itr);
 
 	return rc;
diff --git a/src/plugins/select/bluegene/plugin/jobinfo.c b/src/plugins/select/bluegene/plugin/jobinfo.c
index 63e1f2a2d71b247ff258a36d26da1d0590431661..4107c8d31acbdf1919fa10ccd9d3aca13901b817 100644
--- a/src/plugins/select/bluegene/plugin/jobinfo.c
+++ b/src/plugins/select/bluegene/plugin/jobinfo.c
@@ -132,7 +132,7 @@ extern int set_select_jobinfo(select_jobinfo_t *jobinfo,
 		}
 
 		/* Make sure the conn type is correct with the new count */
-		if((new_size > 1) && (jobinfo->conn_type == SELECT_SMALL))
+		if ((new_size > 1) && (jobinfo->conn_type == SELECT_SMALL))
 			jobinfo->conn_type = SELECT_TORUS;
 		break;
 	case SELECT_JOBDATA_REBOOT:
@@ -161,10 +161,10 @@ extern int set_select_jobinfo(select_jobinfo_t *jobinfo,
 		jobinfo->node_cnt = *uint32;
 #ifdef HAVE_BG_L_P
 		/* Make sure the conn type is correct with the new count */
-		if((bg_conf->bp_node_cnt == bg_conf->nodecard_node_cnt)
-		   || (jobinfo->node_cnt < bg_conf->bp_node_cnt))
+		if ((bg_conf->bp_node_cnt == bg_conf->nodecard_node_cnt)
+		    || (jobinfo->node_cnt < bg_conf->bp_node_cnt))
 			jobinfo->conn_type = SELECT_SMALL;
-		else if(jobinfo->conn_type == SELECT_SMALL)
+		else if (jobinfo->conn_type == SELECT_SMALL)
 			jobinfo->conn_type = SELECT_TORUS;
 #endif
 		break;
@@ -350,7 +350,7 @@ extern int  pack_select_jobinfo(select_jobinfo_t *jobinfo, Buf buffer,
 	uint32_t cluster_flags = slurmdb_setup_cluster_flags();
 	int dims = slurmdb_setup_cluster_dims();
 
-	if(protocol_version >= SLURM_2_2_PROTOCOL_VERSION) {
+	if (protocol_version >= SLURM_2_2_PROTOCOL_VERSION) {
 		if (jobinfo) {
 			/* NOTE: If new elements are added here, make sure to
 			 * add equivalant pack of zeros below for NULL
@@ -409,7 +409,7 @@ extern int  pack_select_jobinfo(select_jobinfo_t *jobinfo, Buf buffer,
 			packstr(jobinfo->nodes, buffer);
 			packstr(jobinfo->ionodes, buffer);
 
-			if(cluster_flags & CLUSTER_FLAG_BGL)
+			if (cluster_flags & CLUSTER_FLAG_BGL)
 				packstr(jobinfo->blrtsimage, buffer);
 
 			packstr(jobinfo->linuximage, buffer);
@@ -429,7 +429,7 @@ extern int  pack_select_jobinfo(select_jobinfo_t *jobinfo, Buf buffer,
 			packnull(buffer); //nodes
 			packnull(buffer); //ionodes
 
-			if(cluster_flags & CLUSTER_FLAG_BGL)
+			if (cluster_flags & CLUSTER_FLAG_BGL)
 				packnull(buffer); //blrts
 
 			packnull(buffer); //linux
@@ -458,7 +458,7 @@ extern int unpack_select_jobinfo(select_jobinfo_t **jobinfo_pptr, Buf buffer,
 	*jobinfo_pptr = jobinfo;
 
 	jobinfo->magic = JOBINFO_MAGIC;
-	if(protocol_version >= SLURM_2_2_PROTOCOL_VERSION) {
+	if (protocol_version >= SLURM_2_2_PROTOCOL_VERSION) {
 		for (i=0; i<dims; i++) {
 			safe_unpack16(&(jobinfo->geometry[i]), buffer);
 		}
@@ -500,7 +500,7 @@ extern int unpack_select_jobinfo(select_jobinfo_t **jobinfo_pptr, Buf buffer,
 		safe_unpackstr_xmalloc(&(jobinfo->ionodes), &uint32_tmp,
 				       buffer);
 
-		if(cluster_flags & CLUSTER_FLAG_BGL)
+		if (cluster_flags & CLUSTER_FLAG_BGL)
 			safe_unpackstr_xmalloc(&(jobinfo->blrtsimage),
 					       &uint32_tmp, buffer);
 		safe_unpackstr_xmalloc(&(jobinfo->linuximage), &uint32_tmp,
@@ -600,7 +600,7 @@ extern char *sprint_select_jobinfo(select_jobinfo_t *jobinfo,
 		snprintf(buf, size, "%s", jobinfo->bg_block_id);
 		break;
 	case SELECT_PRINT_NODES:
-		if(jobinfo->ionodes && jobinfo->ionodes[0])
+		if (jobinfo->ionodes && jobinfo->ionodes[0])
 			snprintf(buf, size, "%s[%s]",
 				 jobinfo->nodes, jobinfo->ionodes);
 		else
@@ -622,22 +622,22 @@ extern char *sprint_select_jobinfo(select_jobinfo_t *jobinfo,
 		snprintf(buf, size, "%s", geo);
 		break;
 	case SELECT_PRINT_BLRTS_IMAGE:
-		if(jobinfo->blrtsimage)
+		if (jobinfo->blrtsimage)
 			tmp_image = jobinfo->blrtsimage;
 		snprintf(buf, size, "%s", tmp_image);
 		break;
 	case SELECT_PRINT_LINUX_IMAGE:
-		if(jobinfo->linuximage)
+		if (jobinfo->linuximage)
 			tmp_image = jobinfo->linuximage;
 		snprintf(buf, size, "%s", tmp_image);
 		break;
 	case SELECT_PRINT_MLOADER_IMAGE:
-		if(jobinfo->mloaderimage)
+		if (jobinfo->mloaderimage)
 			tmp_image = jobinfo->mloaderimage;
 		snprintf(buf, size, "%s", tmp_image);
 		break;
 	case SELECT_PRINT_RAMDISK_IMAGE:
-		if(jobinfo->ramdiskimage)
+		if (jobinfo->ramdiskimage)
 			tmp_image = jobinfo->ramdiskimage;
 		snprintf(buf, size, "%s", tmp_image);
 		break;
@@ -703,21 +703,21 @@ extern char *xstrdup_select_jobinfo(select_jobinfo_t *jobinfo, int mode)
 		break;
 	case SELECT_PRINT_MIXED:
 		xstrfmtcat(buf,
-			 "Connection=%s Reboot=%s Rotate=%s "
-			 "Geometry=%s Block_ID=%s",
-			 conn_type_string(jobinfo->conn_type),
-			 _yes_no_string(jobinfo->reboot),
-			 _yes_no_string(jobinfo->rotate),
-			 geo,
-			 jobinfo->bg_block_id);
+			   "Connection=%s Reboot=%s Rotate=%s "
+			   "Geometry=%s Block_ID=%s",
+			   conn_type_string(jobinfo->conn_type),
+			   _yes_no_string(jobinfo->reboot),
+			   _yes_no_string(jobinfo->rotate),
+			   geo,
+			   jobinfo->bg_block_id);
 		break;
 	case SELECT_PRINT_BG_ID:
 		xstrfmtcat(buf, "%s", jobinfo->bg_block_id);
 		break;
 	case SELECT_PRINT_NODES:
-		if(jobinfo->ionodes && jobinfo->ionodes[0])
+		if (jobinfo->ionodes && jobinfo->ionodes[0])
 			xstrfmtcat(buf, "%s[%s]",
-				 jobinfo->nodes, jobinfo->ionodes);
+				   jobinfo->nodes, jobinfo->ionodes);
 		else
 			xstrfmtcat(buf, "%s", jobinfo->nodes);
 		break;
@@ -737,22 +737,22 @@ extern char *xstrdup_select_jobinfo(select_jobinfo_t *jobinfo, int mode)
 		xstrfmtcat(buf, "%s", geo);
 		break;
 	case SELECT_PRINT_BLRTS_IMAGE:
-		if(jobinfo->blrtsimage)
+		if (jobinfo->blrtsimage)
 			tmp_image = jobinfo->blrtsimage;
 		xstrfmtcat(buf, "%s", tmp_image);
 		break;
 	case SELECT_PRINT_LINUX_IMAGE:
-		if(jobinfo->linuximage)
+		if (jobinfo->linuximage)
 			tmp_image = jobinfo->linuximage;
 		xstrfmtcat(buf, "%s", tmp_image);
 		break;
 	case SELECT_PRINT_MLOADER_IMAGE:
-		if(jobinfo->mloaderimage)
+		if (jobinfo->mloaderimage)
 			tmp_image = jobinfo->mloaderimage;
 		xstrfmtcat(buf, "%s", tmp_image);
 		break;
 	case SELECT_PRINT_RAMDISK_IMAGE:
-		if(jobinfo->ramdiskimage)
+		if (jobinfo->ramdiskimage)
 			tmp_image = jobinfo->ramdiskimage;
 		xstrfmtcat(buf, "%s", tmp_image);
 		break;
diff --git a/src/plugins/select/bluegene/plugin/nodeinfo.c b/src/plugins/select/bluegene/plugin/nodeinfo.c
index b5083bf75a1f404a688c6e0c21ce342680e675e2..5fb55498c4dd7debb1d1cf553b0e6a9d546fbf32 100644
--- a/src/plugins/select/bluegene/plugin/nodeinfo.c
+++ b/src/plugins/select/bluegene/plugin/nodeinfo.c
@@ -45,7 +45,7 @@
 static void _free_node_subgrp(void *object)
 {
 	node_subgrp_t *subgrp = (node_subgrp_t *)object;
-	if(subgrp) {
+	if (subgrp) {
 		FREE_NULL_BITMAP(subgrp->bitmap);
 		xfree(subgrp->str);
 		xfree(subgrp->inx);
@@ -61,12 +61,12 @@ static node_subgrp_t *_find_subgrp(List subgrp_list, enum node_states state,
 	ListIterator itr;
 	xassert(subgrp_list);
 	itr = list_iterator_create(subgrp_list);
-	while((subgrp = list_next(itr))) {
-		if(subgrp->state == state)
+	while ((subgrp = list_next(itr))) {
+		if (subgrp->state == state)
 			break;
 	}
 	list_iterator_destroy(itr);
-	if(!subgrp) {
+	if (!subgrp) {
 		subgrp = xmalloc(sizeof(node_subgrp_t));
 		subgrp->state = state;
 		subgrp->bitmap = bit_alloc(size);
@@ -80,7 +80,7 @@ static node_subgrp_t *_find_subgrp(List subgrp_list, enum node_states state,
 static int _pack_node_subgrp(node_subgrp_t *subgrp, Buf buffer,
 			     uint16_t protocol_version)
 {
-	if(protocol_version >= SLURM_2_1_PROTOCOL_VERSION) {
+	if (protocol_version >= SLURM_2_1_PROTOCOL_VERSION) {
 		pack_bit_fmt(subgrp->bitmap, buffer);
 		pack16(subgrp->node_cnt, buffer);
 		pack16(subgrp->state, buffer);
@@ -99,7 +99,7 @@ static int _unpack_node_subgrp(node_subgrp_t **subgrp_pptr, Buf buffer,
 
 	*subgrp_pptr = subgrp;
 
-	if(protocol_version >= SLURM_2_1_PROTOCOL_VERSION) {
+	if (protocol_version >= SLURM_2_1_PROTOCOL_VERSION) {
 		safe_unpackstr_xmalloc(&subgrp->str, &uint32_tmp, buffer);
 		if (!subgrp->str)
 			subgrp->inx = bitfmt2int("");
@@ -109,7 +109,7 @@ static int _unpack_node_subgrp(node_subgrp_t **subgrp_pptr, Buf buffer,
 		subgrp->bitmap = bit_alloc(bitmap_size);
 
 		j = 0;
-		while(subgrp->inx[j] >= 0) {
+		while (subgrp->inx[j] >= 0) {
 			bit_nset(subgrp->bitmap, subgrp->inx[j],
 				 subgrp->inx[j+1]);
 			j+=2;
@@ -152,17 +152,17 @@ extern int select_nodeinfo_pack(select_nodeinfo_t *nodeinfo, Buf buffer,
 	node_subgrp_t *subgrp = NULL;
 	uint16_t count = 0;
 
-	if(protocol_version >= SLURM_2_1_PROTOCOL_VERSION) {
+	if (protocol_version >= SLURM_2_1_PROTOCOL_VERSION) {
 		pack16(nodeinfo->bitmap_size, buffer);
 
-		if(nodeinfo->subgrp_list)
+		if (nodeinfo->subgrp_list)
 			count = list_count(nodeinfo->subgrp_list);
 
 		pack16(count, buffer);
 
-		if(count > 0) {
+		if (count > 0) {
 			itr = list_iterator_create(nodeinfo->subgrp_list);
-			while((subgrp = list_next(itr))) {
+			while ((subgrp = list_next(itr))) {
 				_pack_node_subgrp(subgrp, buffer,
 						  protocol_version);
 			}
@@ -179,7 +179,7 @@ extern int select_nodeinfo_unpack(select_nodeinfo_t **nodeinfo, Buf buffer,
 	select_nodeinfo_t *nodeinfo_ptr = NULL;
 	uint32_t j = 0;
 
-	if(protocol_version >= SLURM_2_1_PROTOCOL_VERSION) {
+	if (protocol_version >= SLURM_2_1_PROTOCOL_VERSION) {
 		safe_unpack16(&size, buffer);
 
 		nodeinfo_ptr = select_nodeinfo_alloc((uint32_t)size);
@@ -189,10 +189,10 @@ extern int select_nodeinfo_unpack(select_nodeinfo_t **nodeinfo, Buf buffer,
 		nodeinfo_ptr->subgrp_list = list_create(_free_node_subgrp);
 		for(j=0; j<size; j++) {
 			node_subgrp_t *subgrp = NULL;
-			if(_unpack_node_subgrp(&subgrp, buffer,
-					       nodeinfo_ptr->bitmap_size,
-					       protocol_version)
-			   != SLURM_SUCCESS)
+			if (_unpack_node_subgrp(&subgrp, buffer,
+						nodeinfo_ptr->bitmap_size,
+						protocol_version)
+			    != SLURM_SUCCESS)
 				goto unpack_error;
 			list_append(nodeinfo_ptr->subgrp_list, subgrp);
 		}
@@ -212,10 +212,10 @@ extern select_nodeinfo_t *select_nodeinfo_alloc(uint32_t size)
 	select_nodeinfo_t *nodeinfo = xmalloc(sizeof(struct select_nodeinfo));
 
 #ifdef HAVE_BG_L_P
-	if(bg_conf && (!size || size == NO_VAL))
+	if (bg_conf && (!size || size == NO_VAL))
 		size = bg_conf->numpsets;
 #else
-	if(!size || size == NO_VAL)
+	if (!size || size == NO_VAL)
 		fatal("we shouldn't be here in select_nodeinfo_alloc %u", size);
 #endif
 	nodeinfo->bitmap_size = size;
@@ -226,13 +226,13 @@ extern select_nodeinfo_t *select_nodeinfo_alloc(uint32_t size)
 
 extern int select_nodeinfo_free(select_nodeinfo_t *nodeinfo)
 {
-	if(nodeinfo) {
+	if (nodeinfo) {
 		if (nodeinfo->magic != NODEINFO_MAGIC) {
 			error("free_nodeinfo: nodeinfo magic bad");
 			return EINVAL;
 		}
 		nodeinfo->magic = 0;
-		if(nodeinfo->subgrp_list)
+		if (nodeinfo->subgrp_list)
 			list_destroy(nodeinfo->subgrp_list);
 		xfree(nodeinfo);
 	}
@@ -248,12 +248,12 @@ extern int select_nodeinfo_set_all(time_t last_query_time)
 	bg_record_t *bg_record = NULL;
 	static time_t last_set_all = 0;
 
-	if(!blocks_are_created)
+	if (!blocks_are_created)
 		return SLURM_NO_CHANGE_IN_DATA;
 
 	/* only set this once when the last_bg_update is newer than
 	   the last time we set things up. */
-	if(last_set_all && (last_bg_update-1 < last_set_all)) {
+	if (last_set_all && (last_bg_update-1 < last_set_all)) {
 		debug2("Node select info for set all hasn't "
 		       "changed since %ld",
 		       last_set_all);
@@ -273,25 +273,25 @@ extern int select_nodeinfo_set_all(time_t last_query_time)
 		xassert(nodeinfo);
 		xassert(nodeinfo->subgrp_list);
 		list_flush(nodeinfo->subgrp_list);
-		if(nodeinfo->bitmap_size != bg_conf->numpsets)
+		if (nodeinfo->bitmap_size != bg_conf->numpsets)
 			nodeinfo->bitmap_size = bg_conf->numpsets;
 	}
 	itr = list_iterator_create(bg_lists->main);
-	while((bg_record = list_next(itr))) {
+	while ((bg_record = list_next(itr))) {
 		enum node_states state = NODE_STATE_UNKNOWN;
 		node_subgrp_t *subgrp = NULL;
 		select_nodeinfo_t *nodeinfo;
 
 		/* Only mark unidle blocks */
-		if(bg_record->job_running == NO_JOB_RUNNING)
+		if (bg_record->job_running == NO_JOB_RUNNING)
 			continue;
 
-		if(bg_record->state == RM_PARTITION_ERROR)
+		if (bg_record->state == RM_PARTITION_ERROR)
 			state = NODE_STATE_ERROR;
-		else if(bg_record->job_running > NO_JOB_RUNNING) {
+		else if (bg_record->job_running > NO_JOB_RUNNING) {
 			/* we don't need to set the allocated here
 			 * since the whole midplane is allocated */
-			if(bg_record->conn_type < SELECT_SMALL)
+			if (bg_record->conn_type < SELECT_SMALL)
 				continue;
 			state = NODE_STATE_ALLOCATED;
 		} else {
@@ -301,7 +301,7 @@ extern int select_nodeinfo_set_all(time_t last_query_time)
 		}
 
 		for(i=0; i<node_record_count; i++) {
-			if(!bit_test(bg_record->bitmap, i))
+			if (!bit_test(bg_record->bitmap, i))
 				continue;
 			node_ptr = &(node_record_table_ptr[i]);
 
@@ -314,8 +314,9 @@ extern int select_nodeinfo_set_all(time_t last_query_time)
 				nodeinfo->subgrp_list,
 				state, bg_conf->numpsets);
 
-			if(subgrp->node_cnt < bg_conf->bp_node_cnt) {
-				if(bg_record->node_cnt < bg_conf->bp_node_cnt) {
+			if (subgrp->node_cnt < bg_conf->bp_node_cnt) {
+				if (bg_record->node_cnt
+				    < bg_conf->bp_node_cnt) {
 					bit_or(subgrp->bitmap,
 					       bg_record->ionode_bitmap);
 					subgrp->node_cnt += bg_record->node_cnt;
@@ -364,17 +365,17 @@ extern int select_nodeinfo_get(select_nodeinfo_t *nodeinfo,
 		break;
 	case SELECT_NODEDATA_SUBGRP_SIZE:
 		*uint16 = 0;
-		if(!nodeinfo->subgrp_list)
+		if (!nodeinfo->subgrp_list)
 			return SLURM_ERROR;
 		*uint16 = list_count(nodeinfo->subgrp_list);
 		break;
 	case SELECT_NODEDATA_SUBCNT:
 		*uint16 = 0;
-		if(!nodeinfo->subgrp_list)
+		if (!nodeinfo->subgrp_list)
 			return SLURM_ERROR;
 		itr = list_iterator_create(nodeinfo->subgrp_list);
-		while((subgrp = list_next(itr))) {
-			if(subgrp->state == state) {
+		while ((subgrp = list_next(itr))) {
+			if (subgrp->state == state) {
 				*uint16 = subgrp->node_cnt;
 				break;
 			}
@@ -383,11 +384,11 @@ extern int select_nodeinfo_get(select_nodeinfo_t *nodeinfo,
 		break;
 	case SELECT_NODEDATA_BITMAP:
 		*bitmap = NULL;
-		if(!nodeinfo->subgrp_list)
+		if (!nodeinfo->subgrp_list)
 			return SLURM_ERROR;
 		itr = list_iterator_create(nodeinfo->subgrp_list);
-		while((subgrp = list_next(itr))) {
-			if(subgrp->state == state) {
+		while ((subgrp = list_next(itr))) {
+			if (subgrp->state == state) {
 				*bitmap = bit_copy(subgrp->bitmap);
 				break;
 			}
@@ -396,11 +397,11 @@ extern int select_nodeinfo_get(select_nodeinfo_t *nodeinfo,
 		break;
 	case SELECT_NODEDATA_STR:
 		*tmp_char = NULL;
-		if(!nodeinfo->subgrp_list)
+		if (!nodeinfo->subgrp_list)
 			return SLURM_ERROR;
 		itr = list_iterator_create(nodeinfo->subgrp_list);
-		while((subgrp = list_next(itr))) {
-			if(subgrp->state == state) {
+		while ((subgrp = list_next(itr))) {
+			if (subgrp->state == state) {
 				*tmp_char = xstrdup(subgrp->str);
 				break;
 			}
diff --git a/src/plugins/select/bluegene/plugin/opts.c b/src/plugins/select/bluegene/plugin/opts.c
index 24781e632392e5e9b3db74d4201781e3f09a4720..de45b390464d19443dd259249334e45487bbcd92 100644
--- a/src/plugins/select/bluegene/plugin/opts.c
+++ b/src/plugins/select/bluegene/plugin/opts.c
@@ -78,21 +78,21 @@ void parse_command_line(int argc, char *argv[])
 		        break;
 		case (int) 'b':
 		case (int) 'p':
-			if(!block_list)
+			if (!block_list)
 				block_list = list_create(slurm_destroy_char);
-		        slurm_addto_char_list(block_list, optarg);
-			break;
+		slurm_addto_char_list(block_list, optarg);
+		break;
 		case (int) 'h':
 		case (int) OPT_LONG_HELP:
 			_help();
-			exit(0);
+		exit(0);
 		case (int) 'r':
 			remove_blocks = 1;
 			break;
 		case (int) 'u':
 		case (int) OPT_LONG_USAGE:
 			_usage();
-			exit(0);
+		exit(0);
 		case (int) 'V':
 			print_slurm_version();
 			exit(0);
diff --git a/src/plugins/select/bluegene/plugin/select_bluegene.c b/src/plugins/select/bluegene/plugin/select_bluegene.c
index 113d961b408010e785f8914cbbafcf476a14f2eb..fb4aadc6ac28af7f0fe5963e8078e2b44b1f4378 100644
--- a/src/plugins/select/bluegene/plugin/select_bluegene.c
+++ b/src/plugins/select/bluegene/plugin/select_bluegene.c
@@ -205,16 +205,16 @@ static List _get_config(void)
 	key_pair->value = xstrdup_printf("%u", bg_conf->bridge_api_verb);
 	list_append(my_list, key_pair);
 
-	if(bg_conf->deny_pass) {
+	if (bg_conf->deny_pass) {
 		key_pair = xmalloc(sizeof(config_key_pair_t));
 		key_pair->name = xstrdup("DenyPassThrough");
-		if(bg_conf->deny_pass & PASS_DENY_X)
+		if (bg_conf->deny_pass & PASS_DENY_X)
 			xstrcat(key_pair->value, "X,");
-		if(bg_conf->deny_pass & PASS_DENY_Y)
+		if (bg_conf->deny_pass & PASS_DENY_Y)
 			xstrcat(key_pair->value, "Y,");
-		if(bg_conf->deny_pass & PASS_DENY_Z)
+		if (bg_conf->deny_pass & PASS_DENY_Z)
 			xstrcat(key_pair->value, "Z,");
-		if(key_pair->value)
+		if (key_pair->value)
 			key_pair->value[strlen(key_pair->value)-1] = '\0';
 		list_append(my_list, key_pair);
 	}
@@ -266,7 +266,7 @@ extern int init ( void )
 {
 
 #ifdef HAVE_BG_L_P
-	if(bg_recover != NOT_FROM_CONTROLLER) {
+	if (bg_recover != NOT_FROM_CONTROLLER) {
 #if (SYSTEM_DIMENSIONS != 3)
 		fatal("SYSTEM_DIMENSIONS value (%d) invalid for BlueGene",
 		      SYSTEM_DIMENSIONS);
@@ -355,14 +355,14 @@ extern int select_p_state_save(char *dir_name)
 	/* write block records to buffer */
 	slurm_mutex_lock(&block_state_mutex);
 	itr = list_iterator_create(bg_lists->main);
-	while((bg_record = list_next(itr))) {
+	while ((bg_record = list_next(itr))) {
 		if (bg_record->magic != BLOCK_MAGIC)
 			continue;
 		/* on real bluegene systems we only want to keep track of
 		 * the blocks in an error state
 		 */
 #ifdef HAVE_BG_FILES
-		if(bg_record->state != RM_PARTITION_ERROR)
+		if (bg_record->state != RM_PARTITION_ERROR)
 			continue;
 #endif
 		xassert(bg_record->bg_block_id != NULL);
@@ -377,7 +377,7 @@ extern int select_p_state_save(char *dir_name)
 	pack32(blocks_packed, buffer);
 	set_buf_offset(buffer, tmp_offset);
 	/* Maintain config read lock until we copy state_save_location *\
-	\* unlock_slurmctld(part_read_lock);          - see below      */
+	   \* unlock_slurmctld(part_read_lock);          - see below      */
 
 	/* write the buffer to file */
 	slurm_conf_lock();
@@ -415,11 +415,11 @@ extern int select_p_state_save(char *dir_name)
 		(void) unlink(new_file);
 	else {			/* file shuffle */
 		(void) unlink(old_file);
-		if(link(reg_file, old_file))
+		if (link(reg_file, old_file))
 			debug4("unable to create link for %s -> %s: %m",
 			       reg_file, old_file);
 		(void) unlink(reg_file);
-		if(link(new_file, reg_file))
+		if (link(new_file, reg_file))
 			debug4("unable to create link for %s -> %s: %m",
 			       new_file, reg_file);
 		(void) unlink(new_file);
@@ -466,8 +466,8 @@ extern int select_p_job_init(List job_list)
 extern int select_p_node_init(struct node_record *node_ptr, int node_cnt)
 {
 #ifdef HAVE_BG_L_P
-	if(node_cnt>0 && bg_conf)
-		if(node_ptr->cpus >= bg_conf->bp_node_cnt)
+	if (node_cnt>0 && bg_conf)
+		if (node_ptr->cpus >= bg_conf->bp_node_cnt)
 			bg_conf->cpus_per_bp = node_ptr->cpus;
 
 	return SLURM_SUCCESS;
@@ -480,21 +480,21 @@ extern int select_p_node_init(struct node_record *node_ptr, int node_cnt)
  * Called by slurmctld when a new configuration file is loaded
  * or scontrol is used to change block configuration
  */
- extern int select_p_block_init(List part_list)
+extern int select_p_block_init(List part_list)
 {
 #ifdef HAVE_BG_L_P
 	/* select_p_node_init needs to be called before this to set
 	   this up correctly
 	*/
-	if(read_bg_conf() == SLURM_ERROR) {
+	if (read_bg_conf() == SLURM_ERROR) {
 		fatal("Error, could not read the file");
 		return SLURM_ERROR;
 	}
 
-	if(part_list) {
+	if (part_list) {
 		struct part_record *part_ptr = NULL;
 		ListIterator itr = list_iterator_create(part_list);
-		while((part_ptr = list_next(itr))) {
+		while ((part_ptr = list_next(itr))) {
 			part_ptr->max_nodes = part_ptr->max_nodes_orig;
 			part_ptr->min_nodes = part_ptr->min_nodes_orig;
 			select_p_alter_node_cnt(SELECT_SET_BP_CNT,
@@ -615,16 +615,16 @@ extern int select_p_pack_select_info(time_t last_query_time,
 	/* check to see if data has changed */
 	if (last_query_time >= last_bg_update) {
 		debug2("Node select info hasn't changed since %ld",
-			last_bg_update);
+		       last_bg_update);
 		return SLURM_NO_CHANGE_IN_DATA;
-	} else if(blocks_are_created) {
+	} else if (blocks_are_created) {
 		*buffer_ptr = NULL;
 		buffer = init_buf(HUGE_BUF_SIZE);
 		pack32(blocks_packed, buffer);
 		pack_time(last_bg_update, buffer);
 
-		if(protocol_version >= SLURM_2_1_PROTOCOL_VERSION) {
-			if(bg_lists->main) {
+		if (protocol_version >= SLURM_2_1_PROTOCOL_VERSION) {
+			if (bg_lists->main) {
 				slurm_mutex_lock(&block_state_mutex);
 				itr = list_iterator_create(bg_lists->main);
 				while ((bg_record = list_next(itr))) {
@@ -713,8 +713,9 @@ extern int select_p_select_jobinfo_set(select_jobinfo_t *jobinfo,
 	return set_select_jobinfo(jobinfo, data_type, data);
 }
 
-extern int select_p_select_jobinfo_get (select_jobinfo_t *jobinfo,
-				 enum select_jobdata_type data_type, void *data)
+extern int select_p_select_jobinfo_get(select_jobinfo_t *jobinfo,
+				       enum select_jobdata_type data_type,
+				       void *data)
 {
 	return get_select_jobinfo(jobinfo, data_type, data);
 }
@@ -724,7 +725,7 @@ extern select_jobinfo_t *select_p_select_jobinfo_copy(select_jobinfo_t *jobinfo)
 	return copy_select_jobinfo(jobinfo);
 }
 
-extern int select_p_select_jobinfo_free  (select_jobinfo_t *jobinfo)
+extern int select_p_select_jobinfo_free(select_jobinfo_t *jobinfo)
 {
 	return free_select_jobinfo(jobinfo);
 }
@@ -743,7 +744,7 @@ extern int  select_p_select_jobinfo_unpack(select_jobinfo_t **jobinfo,
 }
 
 extern char *select_p_select_jobinfo_sprint(select_jobinfo_t *jobinfo,
-				     char *buf, size_t size, int mode)
+					    char *buf, size_t size, int mode)
 {
 	return sprint_select_jobinfo(jobinfo, buf, size, mode);
 }
@@ -761,7 +762,7 @@ extern int select_p_update_block(update_block_msg_t *block_desc_ptr)
 	bg_record_t *bg_record = NULL;
 	char reason[200];
 
-	if(!block_desc_ptr->bg_block_id) {
+	if (!block_desc_ptr->bg_block_id) {
 		error("update_block: No name specified");
 		return ESLURM_INVALID_BLOCK_NAME;
 	}
@@ -769,19 +770,19 @@ extern int select_p_update_block(update_block_msg_t *block_desc_ptr)
 	slurm_mutex_lock(&block_state_mutex);
 	bg_record = find_bg_record_in_list(bg_lists->main,
 					   block_desc_ptr->bg_block_id);
-	if(!bg_record) {
+	if (!bg_record) {
 		slurm_mutex_unlock(&block_state_mutex);
 		return ESLURM_INVALID_BLOCK_NAME;
 	}
 
-	if(block_desc_ptr->reason)
+	if (block_desc_ptr->reason)
 		snprintf(reason, sizeof(reason), "%s", block_desc_ptr->reason);
-	else if(block_desc_ptr->state == RM_PARTITION_CONFIGURING)
+	else if (block_desc_ptr->state == RM_PARTITION_CONFIGURING)
 		snprintf(reason, sizeof(reason),
 			 "update_block: "
 			 "Admin recreated %s.", bg_record->bg_block_id);
-	else if(block_desc_ptr->state == RM_PARTITION_NAV) {
-		if(bg_record->conn_type < SELECT_SMALL)
+	else if (block_desc_ptr->state == RM_PARTITION_NAV) {
+		if (bg_record->conn_type < SELECT_SMALL)
 			snprintf(reason, sizeof(reason),
 				 "update_block: "
 				 "Admin removed block %s",
@@ -800,11 +801,11 @@ extern int select_p_update_block(update_block_msg_t *block_desc_ptr)
 			 bg_block_state_string(block_desc_ptr->state));
 
 	/* First fail any job running on this block */
-	if(bg_record->job_running > NO_JOB_RUNNING) {
+	if (bg_record->job_running > NO_JOB_RUNNING) {
 		slurm_mutex_unlock(&block_state_mutex);
 		bg_requeue_job(bg_record->job_running, 0);
 		slurm_mutex_lock(&block_state_mutex);
-		if(!block_ptr_exist_in_list(bg_lists->main, bg_record)) {
+		if (!block_ptr_exist_in_list(bg_lists->main, bg_record)) {
 			slurm_mutex_unlock(&block_state_mutex);
 			error("while trying to put block in "
 			      "error state it disappeared");
@@ -818,7 +819,7 @@ extern int select_p_update_block(update_block_msg_t *block_desc_ptr)
 		bg_record->job_ptr = NULL;
 	}
 
-	if(block_desc_ptr->state == RM_PARTITION_ERROR) {
+	if (block_desc_ptr->state == RM_PARTITION_ERROR) {
 		bg_record_t *found_record = NULL;
 		ListIterator itr;
 		List delete_list = list_create(NULL);
@@ -833,15 +834,16 @@ extern int select_p_update_block(update_block_msg_t *block_desc_ptr)
 			if (bg_record == found_record)
 				continue;
 
-			if(!blocks_overlap(bg_record, found_record)) {
+			if (!blocks_overlap(bg_record, found_record)) {
 				debug2("block %s isn't part of errored %s",
 				       found_record->bg_block_id,
 				       bg_record->bg_block_id);
 				continue;
 			}
-			if(found_record->job_running > NO_JOB_RUNNING) {
-				if(found_record->job_ptr
-				   && IS_JOB_CONFIGURING(found_record->job_ptr))
+			if (found_record->job_running > NO_JOB_RUNNING) {
+				if (found_record->job_ptr
+				    && IS_JOB_CONFIGURING(
+					    found_record->job_ptr))
 					info("Pending job %u on block %s "
 					     "will try to be requeued "
 					     "because overlapping block %s "
@@ -874,11 +876,11 @@ extern int select_p_update_block(update_block_msg_t *block_desc_ptr)
 		free_block_list(NO_VAL, delete_list, 0, 0);
 		list_destroy(delete_list);
 		put_block_in_error_state(bg_record, BLOCK_ERROR_STATE, reason);
-	} else if(block_desc_ptr->state == RM_PARTITION_FREE) {
+	} else if (block_desc_ptr->state == RM_PARTITION_FREE) {
 		bg_free_block(bg_record, 0, 1);
 		resume_block(bg_record);
 		slurm_mutex_unlock(&block_state_mutex);
-	} else if(block_desc_ptr->state == RM_PARTITION_DEALLOCATING) {
+	} else if (block_desc_ptr->state == RM_PARTITION_DEALLOCATING) {
 		/* This can't be RM_PARTITION_READY since the enum
 		   changed from BGL to BGP and if we are running cross
 		   cluster it just doesn't work.
@@ -898,7 +900,7 @@ extern int select_p_update_block(update_block_msg_t *block_desc_ptr)
 		list_push(delete_list, bg_record);
 		/* only do the while loop if we are dealing with a
 		   small block */
-		if(bg_record->conn_type < SELECT_SMALL)
+		if (bg_record->conn_type < SELECT_SMALL)
 			goto large_block;
 
 		itr = list_iterator_create(bg_lists->main);
@@ -906,16 +908,17 @@ extern int select_p_update_block(update_block_msg_t *block_desc_ptr)
 			if (bg_record == found_record)
 				continue;
 
-			if(!bit_equal(bg_record->bitmap,
-				      found_record->bitmap)) {
+			if (!bit_equal(bg_record->bitmap,
+				       found_record->bitmap)) {
 				debug2("block %s isn't part of to be freed %s",
 				       found_record->bg_block_id,
 				       bg_record->bg_block_id);
 				continue;
 			}
-			if(found_record->job_running > NO_JOB_RUNNING) {
-				if(found_record->job_ptr
-				   && IS_JOB_CONFIGURING(found_record->job_ptr))
+			if (found_record->job_running > NO_JOB_RUNNING) {
+				if (found_record->job_ptr
+				    && IS_JOB_CONFIGURING(
+					    found_record->job_ptr))
 					info("Pending job %u on block %s "
 					     "will try to be requeued "
 					     "because overlapping block %s "
@@ -949,7 +952,7 @@ extern int select_p_update_block(update_block_msg_t *block_desc_ptr)
 		   to a normal state in accounting first */
 		itr = list_iterator_create(delete_list);
 		while ((found_record = list_next(itr))) {
-			if(found_record->state == RM_PARTITION_ERROR)
+			if (found_record->state == RM_PARTITION_ERROR)
 				resume_block(found_record);
 		}
 		list_iterator_destroy(itr);
@@ -964,15 +967,15 @@ extern int select_p_update_block(update_block_msg_t *block_desc_ptr)
 
 		/* make sure if we are removing a block to put it back
 		   to a normal state in accounting first */
-		if(bg_record->state == RM_PARTITION_ERROR)
+		if (bg_record->state == RM_PARTITION_ERROR)
 			resume_block(bg_record);
 
 		term_jobs_on_block(bg_record->bg_block_id);
-		if(bg_conf->slurm_debug_flags & DEBUG_FLAG_SELECT_TYPE)
+		if (bg_conf->slurm_debug_flags & DEBUG_FLAG_SELECT_TYPE)
 			info("select_p_update_block: "
 			     "freeing the block %s.", bg_record->bg_block_id);
 		bg_free_block(bg_record, 1, 1);
-		if(bg_conf->slurm_debug_flags & DEBUG_FLAG_SELECT_TYPE)
+		if (bg_conf->slurm_debug_flags & DEBUG_FLAG_SELECT_TYPE)
 			info("select_p_update_block: done");
 
 		/* Now remove it from the main list since we are
@@ -982,14 +985,14 @@ extern int select_p_update_block(update_block_msg_t *block_desc_ptr)
 		remove_from_bg_list(bg_lists->main, bg_record);
 
 #ifdef HAVE_BG_FILES
-		if(bg_conf->slurm_debug_flags & DEBUG_FLAG_SELECT_TYPE)
+		if (bg_conf->slurm_debug_flags & DEBUG_FLAG_SELECT_TYPE)
 			info("select_p_update_block: "
 			     "removing %s from database",
 			     bg_record->bg_block_id);
 
 		rc = bridge_remove_block(bg_record->bg_block_id);
 		if (rc != STATUS_OK) {
-			if(rc == PARTITION_NOT_FOUND) {
+			if (rc == PARTITION_NOT_FOUND) {
 				debug("select_p_update_block: "
 				      "block %s is not found",
 				      bg_record->bg_block_id);
@@ -1000,12 +1003,12 @@ extern int select_p_update_block(update_block_msg_t *block_desc_ptr)
 				      bg_err_str(rc));
 			}
 		} else
-			if(bg_conf->slurm_debug_flags & DEBUG_FLAG_SELECT_TYPE)
+			if (bg_conf->slurm_debug_flags & DEBUG_FLAG_SELECT_TYPE)
 				info("select_p_update_block: done %s",
 				     (char *)bg_record->bg_block_id);
 #endif
 		xfree(bg_record->bg_block_id);
-		if(configure_block(bg_record) == SLURM_ERROR) {
+		if (configure_block(bg_record) == SLURM_ERROR) {
 			destroy_bg_record(bg_record);
 			error("select_p_update_block: "
 			      "unable to configure block in api");
@@ -1044,7 +1047,7 @@ extern int select_p_update_sub_node (update_block_msg_t *block_desc_ptr)
 	bitstr_t *ionode_bitmap = NULL;
 	char *name = NULL;
 
-	if(bg_conf->layout_mode != LAYOUT_DYNAMIC) {
+	if (bg_conf->layout_mode != LAYOUT_DYNAMIC) {
 		info("You can't use this call unless you are on a Dynamically "
 		     "allocated system.  Please use update BlockName instead");
 		rc = ESLURM_INVALID_BLOCK_LAYOUT;
@@ -1053,7 +1056,7 @@ extern int select_p_update_sub_node (update_block_msg_t *block_desc_ptr)
 
 	memset(coord, 0, sizeof(coord));
 	memset(ionodes, 0, 128);
-	if(!block_desc_ptr->nodes) {
+	if (!block_desc_ptr->nodes) {
 		error("update_sub_node: No name specified");
 		rc = ESLURM_INVALID_BLOCK_NAME;
 		goto end_it;
@@ -1062,25 +1065,25 @@ extern int select_p_update_sub_node (update_block_msg_t *block_desc_ptr)
 
 	while (name[j] != '\0') {
 		if (name[j] == '[') {
-			if(set<1) {
+			if (set<1) {
 				rc = SLURM_ERROR;
 				goto end_it;
 			}
 			i = j++;
-			if((name[j] < '0'
-			    || name[j] > 'Z'
-			    || (name[j] > '9'
-				&& name[j] < 'A'))) {
+			if ((name[j] < '0'
+			     || name[j] > 'Z'
+			     || (name[j] > '9'
+				 && name[j] < 'A'))) {
 				error("update_sub_node: sub block is empty");
 				rc = SLURM_ERROR;
 				goto end_it;
 			}
-			while(name[i] != '\0') {
-				if(name[i] == ']')
+			while (name[i] != '\0') {
+				if (name[i] == ']')
 					break;
 				i++;
 			}
-			if(name[i] != ']') {
+			if (name[i] != ']') {
 				error("update_sub_node: "
 				      "No close (']') on sub block");
 				rc = SLURM_ERROR;
@@ -1090,20 +1093,20 @@ extern int select_p_update_sub_node (update_block_msg_t *block_desc_ptr)
 			strncpy(ionodes, name+j, i-j);
 			set++;
 			break;
-		} else if((name[j] >= '0'
-			   && name[j] <= '9')
-			  || (name[j] >= 'A'
-			      && name[j] <= 'Z')) {
-			if(set) {
+		} else if ((name[j] >= '0'
+			    && name[j] <= '9')
+			   || (name[j] >= 'A'
+			       && name[j] <= 'Z')) {
+			if (set) {
 				rc = SLURM_ERROR;
 				goto end_it;
 			}
 			/* make sure we are asking for a correct name */
 			for(i = 0; i < SYSTEM_DIMENSIONS; i++) {
-				if((name[j+i] >= '0'
-				    && name[j+i] <= '9')
-				   || (name[j+i] >= 'A'
-				      && name[j+i] <= 'Z'))
+				if ((name[j+i] >= '0'
+				     && name[j+i] <= '9')
+				    || (name[j+i] >= 'A'
+					&& name[j+i] <= 'Z'))
 					continue;
 
 				error("update_sub_node: "
@@ -1121,7 +1124,7 @@ extern int select_p_update_sub_node (update_block_msg_t *block_desc_ptr)
 		j++;
 	}
 
-	if(set != 2) {
+	if (set != 2) {
 		error("update_sub_node: "
 		      "I didn't get the base partition and the sub part.");
 		rc = SLURM_ERROR;
@@ -1129,7 +1132,7 @@ extern int select_p_update_sub_node (update_block_msg_t *block_desc_ptr)
 	}
 	ionode_bitmap = bit_alloc(bg_conf->numpsets);
 	bit_unfmt(ionode_bitmap, ionodes);
-	if(bit_ffs(ionode_bitmap) == -1) {
+	if (bit_ffs(ionode_bitmap) == -1) {
 		error("update_sub_node: Invalid ionode '%s' given.", ionodes);
 		rc = SLURM_ERROR;
 		FREE_NULL_BITMAP(ionode_bitmap);
@@ -1137,12 +1140,12 @@ extern int select_p_update_sub_node (update_block_msg_t *block_desc_ptr)
 	}
 	node_name = xstrdup_printf("%s%s", bg_conf->slurm_node_prefix, coord);
 	/* find out how many nodecards to get for each ionode */
-	if(block_desc_ptr->state == RM_PARTITION_ERROR) {
+	if (block_desc_ptr->state == RM_PARTITION_ERROR) {
 		info("Admin setting %s[%s] in an error state",
 		     node_name, ionodes);
 		for(i = 0; i<bg_conf->numpsets; i++) {
-			if(bit_test(ionode_bitmap, i)) {
-				if((int)nc_pos != (int)last_pos) {
+			if (bit_test(ionode_bitmap, i)) {
+				if ((int)nc_pos != (int)last_pos) {
 					/* find first bit in nc */
 					int start_io =
 						(int)nc_pos * bg_conf->io_ratio;
@@ -1152,7 +1155,7 @@ extern int select_p_update_sub_node (update_block_msg_t *block_desc_ptr)
 			}
 			nc_pos += bg_conf->nc_ratio;
 		}
-	} else if(block_desc_ptr->state == RM_PARTITION_FREE) {
+	} else if (block_desc_ptr->state == RM_PARTITION_FREE) {
 		info("Admin setting %s[%s] in an free state",
 		     node_name, ionodes);
 		up_nodecard(node_name, ionode_bitmap);
@@ -1223,7 +1226,7 @@ extern int select_p_update_node_state (int index, uint16_t state)
 		for (z = 0; z < DIM_SIZE[Z]; z++) {
 			for (x = 0; x < DIM_SIZE[X]; x++) {
 				if (ba_system_ptr->grid[x][y][z].index
-				     == index) {
+				    == index) {
 					ba_update_node_state(
 						&ba_system_ptr->grid[x][y][z],
 						state);
@@ -1245,31 +1248,31 @@ extern int select_p_alter_node_cnt(enum select_node_cnt type, void *data)
 	int i;
 	uint16_t req_geometry[SYSTEM_DIMENSIONS];
 
-	if(!bg_conf->bp_node_cnt) {
+	if (!bg_conf->bp_node_cnt) {
 		fatal("select_p_alter_node_cnt: This can't be called "
 		      "before init");
 	}
 
 	switch (type) {
 	case SELECT_GET_NODE_SCALING:
-		if((*nodes) != INFINITE)
+		if ((*nodes) != INFINITE)
 			(*nodes) = bg_conf->bp_node_cnt;
 		break;
 	case SELECT_GET_NODE_CPU_CNT:
-		if((*cpus) != (uint16_t)INFINITE)
+		if ((*cpus) != (uint16_t)INFINITE)
 			(*cpus) = bg_conf->cpu_ratio;
 		break;
 	case SELECT_GET_BP_CPU_CNT:
-		if((*nodes) != INFINITE)
+		if ((*nodes) != INFINITE)
 			(*nodes) = bg_conf->cpus_per_bp;
 		break;
 	case SELECT_SET_BP_CNT:
-		if(((*nodes) == INFINITE) || ((*nodes) == NO_VAL))
+		if (((*nodes) == INFINITE) || ((*nodes) == NO_VAL))
 			tmp = (*nodes);
-		else if((*nodes) > bg_conf->bp_node_cnt) {
+		else if ((*nodes) > bg_conf->bp_node_cnt) {
 			tmp = (*nodes);
 			tmp /= bg_conf->bp_node_cnt;
-			if(tmp < 1)
+			if (tmp < 1)
 				tmp = 1;
 		} else
 			tmp = 1;
@@ -1285,27 +1288,27 @@ extern int select_p_alter_node_cnt(enum select_node_cnt type, void *data)
 		(*nodes) *= bg_conf->bp_node_cnt;
 		break;
 	case SELECT_APPLY_NODE_MAX_OFFSET:
-		if((*nodes) != INFINITE)
+		if ((*nodes) != INFINITE)
 			(*nodes) *= bg_conf->bp_node_cnt;
 		break;
 	case SELECT_SET_NODE_CNT:
 		get_select_jobinfo(job_desc->select_jobinfo->data,
 				   SELECT_JOBDATA_ALTERED, &tmp);
-		if(tmp == 1) {
+		if (tmp == 1) {
 			return SLURM_SUCCESS;
 		}
 		tmp = 1;
 		set_select_jobinfo(job_desc->select_jobinfo->data,
 				   SELECT_JOBDATA_ALTERED, &tmp);
 
-		if(job_desc->min_nodes == (uint32_t) NO_VAL)
+		if (job_desc->min_nodes == (uint32_t) NO_VAL)
 			return SLURM_SUCCESS;
 
 		get_select_jobinfo(job_desc->select_jobinfo->data,
 				   SELECT_JOBDATA_GEOMETRY, &req_geometry);
 
-		if(req_geometry[0] != 0
-		   && req_geometry[0] != (uint16_t)NO_VAL) {
+		if (req_geometry[0] != 0
+		    && req_geometry[0] != (uint16_t)NO_VAL) {
 			job_desc->min_nodes = 1;
 			for (i=0; i<SYSTEM_DIMENSIONS; i++)
 				job_desc->min_nodes *=
@@ -1317,34 +1320,34 @@ extern int select_p_alter_node_cnt(enum select_node_cnt type, void *data)
 		/* make sure if the user only specified min_cpus to
 		   set min_nodes correctly
 		*/
-		if((job_desc->min_cpus != NO_VAL)
-		   && (job_desc->min_cpus > job_desc->min_nodes))
+		if ((job_desc->min_cpus != NO_VAL)
+		    && (job_desc->min_cpus > job_desc->min_nodes))
 			job_desc->min_nodes =
 				job_desc->min_cpus / bg_conf->cpu_ratio;
 
 		/* initialize min_cpus to the min_nodes */
 		job_desc->min_cpus = job_desc->min_nodes * bg_conf->cpu_ratio;
 
-		if((job_desc->max_nodes == (uint32_t) NO_VAL)
-		   || (job_desc->max_nodes < job_desc->min_nodes))
+		if ((job_desc->max_nodes == (uint32_t) NO_VAL)
+		    || (job_desc->max_nodes < job_desc->min_nodes))
 			job_desc->max_nodes = job_desc->min_nodes;
 
 		/* See if min_nodes is greater than one base partition */
-		if(job_desc->min_nodes > bg_conf->bp_node_cnt) {
+		if (job_desc->min_nodes > bg_conf->bp_node_cnt) {
 			/*
 			 * if it is make sure it is a factor of
 			 * bg_conf->bp_node_cnt, if it isn't make it
 			 * that way
 			 */
 			tmp = job_desc->min_nodes % bg_conf->bp_node_cnt;
-			if(tmp > 0)
+			if (tmp > 0)
 				job_desc->min_nodes +=
 					(bg_conf->bp_node_cnt-tmp);
 		}
 		tmp = job_desc->min_nodes / bg_conf->bp_node_cnt;
 
 		/* this means it is greater or equal to one bp */
-		if(tmp > 0) {
+		if (tmp > 0) {
 			set_select_jobinfo(job_desc->select_jobinfo->data,
 					   SELECT_JOBDATA_NODE_CNT,
 					   &job_desc->min_nodes);
@@ -1352,12 +1355,12 @@ extern int select_p_alter_node_cnt(enum select_node_cnt type, void *data)
 			job_desc->min_cpus = bg_conf->cpus_per_bp * tmp;
 		} else {
 #ifdef HAVE_BGL
-			if(job_desc->min_nodes <= bg_conf->nodecard_node_cnt
-			   && bg_conf->nodecard_ionode_cnt)
+			if (job_desc->min_nodes <= bg_conf->nodecard_node_cnt
+			    && bg_conf->nodecard_ionode_cnt)
 				job_desc->min_nodes =
 					bg_conf->nodecard_node_cnt;
-			else if(job_desc->min_nodes
-				<= bg_conf->quarter_node_cnt)
+			else if (job_desc->min_nodes
+				 <= bg_conf->quarter_node_cnt)
 				job_desc->min_nodes =
 					bg_conf->quarter_node_cnt;
 			else
@@ -1374,8 +1377,8 @@ extern int select_p_alter_node_cnt(enum select_node_cnt type, void *data)
 			job_desc->min_nodes = 1;
 #else
 			i = bg_conf->smallest_block;
-			while(i <= bg_conf->bp_node_cnt) {
-				if(job_desc->min_nodes <= i) {
+			while (i <= bg_conf->bp_node_cnt) {
+				if (job_desc->min_nodes <= i) {
 					job_desc->min_nodes = i;
 					break;
 				}
@@ -1392,27 +1395,27 @@ extern int select_p_alter_node_cnt(enum select_node_cnt type, void *data)
 #endif
 		}
 
-		if(job_desc->max_nodes > bg_conf->bp_node_cnt) {
+		if (job_desc->max_nodes > bg_conf->bp_node_cnt) {
 			tmp = job_desc->max_nodes % bg_conf->bp_node_cnt;
-			if(tmp > 0)
+			if (tmp > 0)
 				job_desc->max_nodes +=
 					(bg_conf->bp_node_cnt-tmp);
 		}
 		tmp = job_desc->max_nodes / bg_conf->bp_node_cnt;
 
-		if(tmp > 0) {
+		if (tmp > 0) {
 			job_desc->max_nodes = tmp;
 			job_desc->max_cpus =
 				job_desc->max_nodes * bg_conf->cpus_per_bp;
 			tmp = NO_VAL;
 		} else {
 #ifdef HAVE_BGL
-			if(job_desc->max_nodes <= bg_conf->nodecard_node_cnt
-			   && bg_conf->nodecard_ionode_cnt)
+			if (job_desc->max_nodes <= bg_conf->nodecard_node_cnt
+			    && bg_conf->nodecard_ionode_cnt)
 				job_desc->max_nodes =
 					bg_conf->nodecard_node_cnt;
-			else if(job_desc->max_nodes
-				<= bg_conf->quarter_node_cnt)
+			else if (job_desc->max_nodes
+				 <= bg_conf->quarter_node_cnt)
 				job_desc->max_nodes =
 					bg_conf->quarter_node_cnt;
 			else
@@ -1424,8 +1427,8 @@ extern int select_p_alter_node_cnt(enum select_node_cnt type, void *data)
 			job_desc->max_nodes = 1;
 #else
 			i = bg_conf->smallest_block;
-			while(i <= bg_conf->bp_node_cnt) {
-				if(job_desc->max_nodes <= i) {
+			while (i <= bg_conf->bp_node_cnt) {
+				if (job_desc->max_nodes <= i) {
 					job_desc->max_nodes = i;
 					break;
 				}
@@ -1454,15 +1457,15 @@ extern int select_p_reconfigure(void)
 {
 #ifdef HAVE_BG_L_P
 	slurm_conf_lock();
-	if(!slurmctld_conf.slurm_user_name
-	   || strcmp(bg_conf->slurm_user_name, slurmctld_conf.slurm_user_name))
+	if (!slurmctld_conf.slurm_user_name
+	    || strcmp(bg_conf->slurm_user_name, slurmctld_conf.slurm_user_name))
 		error("The slurm user has changed from '%s' to '%s'.  "
 		      "If this is really what you "
 		      "want you will need to restart slurm for this "
 		      "change to be enforced in the bluegene plugin.",
 		      bg_conf->slurm_user_name, slurmctld_conf.slurm_user_name);
-	if(!slurmctld_conf.node_prefix
-	   || strcmp(bg_conf->slurm_node_prefix, slurmctld_conf.node_prefix))
+	if (!slurmctld_conf.node_prefix
+	    || strcmp(bg_conf->slurm_node_prefix, slurmctld_conf.node_prefix))
 		error("Node Prefix has changed from '%s' to '%s'.  "
 		      "If this is really what you "
 		      "want you will need to restart slurm for this "
diff --git a/src/plugins/select/bluegene/plugin/sfree.c b/src/plugins/select/bluegene/plugin/sfree.c
index 602170ee8253a7511cfd3e514c7fb1bb460aba8c..87aa795ced3b800371749b4eba83911a6dff691d 100644
--- a/src/plugins/select/bluegene/plugin/sfree.c
+++ b/src/plugins/select/bluegene/plugin/sfree.c
@@ -73,7 +73,7 @@ static int _get_new_info_block(block_info_msg_t **block_ptr)
 
 	bg_info_ptr = new_bg_ptr;
 
-	if(*block_ptr != bg_info_ptr)
+	if (*block_ptr != bg_info_ptr)
 		error_code = SLURM_SUCCESS;
 
 	*block_ptr = new_bg_ptr;
@@ -88,28 +88,28 @@ static int _check_status()
 	block_info_msg_t *block_ptr = NULL;
 	char *block_name = NULL;
 
-	while(list_count(block_list)) {
+	while (list_count(block_list)) {
 		info("waiting for %d bgblocks to free...",
 		     list_count(block_list));
-		if(_get_new_info_block(&block_ptr)
-		   == SLURM_SUCCESS) {
-			while((block_name = list_next(itr))) {
+		if (_get_new_info_block(&block_ptr)
+		    == SLURM_SUCCESS) {
+			while ((block_name = list_next(itr))) {
 				for (i=0; i<block_ptr->record_count;
 				     i++) {
-					if(!strcmp(block_name,
-						   block_ptr->
-						   block_array[i].
-						   bg_block_id)) {
-						if(block_ptr->
-						   block_array[i].
-						   state == RM_PARTITION_FREE)
+					if (!strcmp(block_name,
+						    block_ptr->
+						    block_array[i].
+						    bg_block_id)) {
+						if (block_ptr->
+						    block_array[i].
+						    state == RM_PARTITION_FREE)
 							list_delete_item(itr);
 						break;
 					}
 				}
 				/* Here if we didn't find the record
 				   it is gone so we just will delete it. */
-				if(i >= block_ptr->record_count)
+				if (i >= block_ptr->record_count)
 					list_delete_item(itr);
 			}
 			list_iterator_reset(itr);
@@ -132,16 +132,16 @@ int main(int argc, char *argv[])
 	parse_command_line(argc, argv);
 
 	memset(&msg, 0, sizeof(update_block_msg_t));
-	if(!all_blocks && (!block_list || !list_count(block_list))) {
+	if (!all_blocks && (!block_list || !list_count(block_list))) {
 		error("you need at least one block to remove.");
 		exit(1);
 	}
 
-	if(all_blocks) {
+	if (all_blocks) {
 		int i=0;
 		block_info_msg_t *block_ptr = NULL;
 		_get_new_info_block(&block_ptr);
-		if(block_list)
+		if (block_list)
 			list_flush(block_list);
 		else
 			block_list = list_create(slurm_destroy_char);
@@ -154,19 +154,19 @@ int main(int argc, char *argv[])
 	}
 
 	itr = list_iterator_create(block_list);
-	while((block_name = list_next(itr))) {
-		if(remove_blocks)
+	while ((block_name = list_next(itr))) {
+		if (remove_blocks)
 			msg.state = RM_PARTITION_NAV;
 		else
 			msg.state = RM_PARTITION_FREE;
 		msg.bg_block_id = block_name;
 		rc = slurm_update_block(&msg);
-		if(rc != SLURM_SUCCESS)
+		if (rc != SLURM_SUCCESS)
 			error("Error trying to free block %s: %s",
 			      block_name, slurm_strerror(rc));
 	}
 	list_iterator_destroy(itr);
-	if(wait_full)
+	if (wait_full)
 		_check_status();
 	list_destroy(block_list);
 	info("done");
diff --git a/src/plugins/select/bluegene/plugin/slurm_prolog.c b/src/plugins/select/bluegene/plugin/slurm_prolog.c
index 260cf3def0ca4e10c8f9e8bd8478c22b35b620f8..d96a6b943155ce86940b98292c37fa7c11ce269a 100644
--- a/src/plugins/select/bluegene/plugin/slurm_prolog.c
+++ b/src/plugins/select/bluegene/plugin/slurm_prolog.c
@@ -102,7 +102,7 @@ static int _wait_part_ready(uint32_t job_id)
 	int is_ready = 0, i, rc;
 
 	max_delay = BG_FREE_PREVIOUS_BLOCK + BG_MIN_BLOCK_BOOT +
-		   (BG_INCR_BLOCK_BOOT * _get_job_size(job_id));
+		(BG_INCR_BLOCK_BOOT * _get_job_size(job_id));
 
 #if _DEBUG
 	printf("Waiting for job %u to become ready.", job_id);
@@ -205,12 +205,12 @@ static int _partitions_dealloc()
 
 	if (error_code) {
 		fprintf(stderr, "slurm_load_partitions: %s\n",
-		       slurm_strerror(slurm_get_errno()));
+			slurm_strerror(slurm_get_errno()));
 		return -1;
 	}
 	for (i=0; i<new_bg_ptr->record_count; i++) {
-		if(new_bg_ptr->block_array[i].state
-		   == RM_PARTITION_DEALLOCATING) {
+		if (new_bg_ptr->block_array[i].state
+		    == RM_PARTITION_DEALLOCATING) {
 			rc = 1;
 			break;
 		}
diff --git a/src/plugins/select/bluegene/plugin/state_test.c b/src/plugins/select/bluegene/plugin/state_test.c
index f2a075b91466a5e0a3871d74468200781c84f524..1afd158840813ca44621b2732acb8016dabd3358 100644
--- a/src/plugins/select/bluegene/plugin/state_test.c
+++ b/src/plugins/select/bluegene/plugin/state_test.c
@@ -95,7 +95,7 @@ static void _configure_node_down(rm_bp_id_t bp_id, my_bluegene_t *my_bg)
 			continue;
 		}
 
-		if(!bpid) {
+		if (!bpid) {
 			error("No BPID was returned from database");
 			continue;
 		}
@@ -122,9 +122,9 @@ static void _configure_node_down(rm_bp_id_t bp_id, my_bluegene_t *my_bg)
 		}
 
 		/* make sure we have this midplane in the system */
-		if(bp_loc.X >= DIM_SIZE[X]
-		   || bp_loc.Y >= DIM_SIZE[Y]
-		   || bp_loc.Z >= DIM_SIZE[Z]) {
+		if (bp_loc.X >= DIM_SIZE[X]
+		    || bp_loc.Y >= DIM_SIZE[Y]
+		    || bp_loc.Z >= DIM_SIZE[Z]) {
 			debug4("node %s%c%c%c isn't configured",
 			       bg_conf->slurm_node_prefix,
 			       alpha_num[bp_loc.X], alpha_num[bp_loc.Y],
@@ -164,9 +164,9 @@ static char *_get_bp_node_name(rm_BP_t *bp_ptr)
 	}
 
 	/* make sure we have this midplane in the system */
-	if(bp_loc.X >= DIM_SIZE[X]
-	   || bp_loc.Y >= DIM_SIZE[Y]
-	   || bp_loc.Z >= DIM_SIZE[Z]) {
+	if (bp_loc.X >= DIM_SIZE[X]
+	    || bp_loc.Y >= DIM_SIZE[Y]
+	    || bp_loc.Z >= DIM_SIZE[Z]) {
 		debug4("node %s%c%c%c isn't configured",
 		       bg_conf->slurm_node_prefix,
 		       alpha_num[bp_loc.X], alpha_num[bp_loc.Y],
@@ -181,9 +181,9 @@ static char *_get_bp_node_name(rm_BP_t *bp_ptr)
 }
 
 /* To fake a nodecard down do this on the service node.
-db2 "update bg{l|p}nodecard set status = 'E' where location =
-'Rxx-Mx-Nx' and status='A'"
-Reverse the A, and E to bring it back up.
+   db2 "update bg{l|p}nodecard set status = 'E' where location =
+   'Rxx-Mx-Nx' and status='A'"
+   Reverse the A, and E to bring it back up.
 */
 static int _test_nodecard_state(rm_nodecard_t *ncard, int nc_id,
 				char *node_name, bool slurmctld_locked)
@@ -201,7 +201,7 @@ static int _test_nodecard_state(rm_nodecard_t *ncard, int nc_id,
 		return SLURM_ERROR;
 	}
 
-	if(state == RM_NODECARD_UP)
+	if (state == RM_NODECARD_UP)
 		return SLURM_SUCCESS;
 
 	if ((rc = bridge_get_data(ncard,
@@ -211,7 +211,7 @@ static int _test_nodecard_state(rm_nodecard_t *ncard, int nc_id,
 		return SLURM_ERROR;
 	}
 
-	if(!nc_name) {
+	if (!nc_name) {
 		error("We didn't get an RM_NodeCardID but rc was STATUS_OK?");
 		return SLURM_ERROR;
 	}
@@ -238,9 +238,9 @@ static int _test_nodecard_state(rm_nodecard_t *ncard, int nc_id,
 	   state.  To avoid getting a bunch of warnings here just
 	   skip over the ones missing.
 	*/
-	if(io_start >= bg_conf->numpsets) {
+	if (io_start >= bg_conf->numpsets) {
 		rc = SLURM_SUCCESS;
-		if(state == RM_NODECARD_MISSING) {
+		if (state == RM_NODECARD_MISSING) {
 			debug3("Nodecard %s is missing",
 			       nc_name);
 		} else {
@@ -252,7 +252,7 @@ static int _test_nodecard_state(rm_nodecard_t *ncard, int nc_id,
 		goto clean_up;
 	}
 
-	/* if(!ionode_bitmap) */
+	/* if (!ionode_bitmap) */
 	/* 	ionode_bitmap = bit_alloc(bg_conf->numpsets); */
 	/* info("setting %s start %d of %d", */
 	/*      nc_name,  io_start, bg_conf->numpsets); */
@@ -260,8 +260,8 @@ static int _test_nodecard_state(rm_nodecard_t *ncard, int nc_id,
 
 	/* we have to handle each nodecard separately to make
 	   sure we don't create holes in the system */
-	if(down_nodecard(node_name, io_start, slurmctld_locked)
-	   == SLURM_SUCCESS) {
+	if (down_nodecard(node_name, io_start, slurmctld_locked)
+	    == SLURM_SUCCESS) {
 		debug("nodecard %s on %s is in an error state",
 		      nc_name, node_name);
 	} else
@@ -300,7 +300,7 @@ static int _test_down_nodecards(rm_BP_t *bp_ptr, bool slurmctld_locked)
 	//int io_cnt = 1;
 
 	/* Translate 1 nodecard count to ionode count */
-/* 	if((io_cnt *= bg_conf->io_ratio)) */
+/* 	if ((io_cnt *= bg_conf->io_ratio)) */
 /* 		io_cnt--; */
 
 	if ((rc = bridge_get_data(bp_ptr, RM_BPID, &bp_id))
@@ -321,13 +321,13 @@ static int _test_down_nodecards(rm_BP_t *bp_ptr, bool slurmctld_locked)
 	/* The node_name will only be NULL if this system doesn't
 	   really have the node.
 	*/
-	if(!(node_name = _get_bp_node_name(bp_ptr))) {
+	if (!(node_name = _get_bp_node_name(bp_ptr))) {
 		rc = SLURM_ERROR;
 		goto clean_up;
 	}
 
-	if((rc = bridge_get_data(ncard_list, RM_NodeCardListSize, &num))
-	   != STATUS_OK) {
+	if ((rc = bridge_get_data(ncard_list, RM_NodeCardListSize, &num))
+	    != STATUS_OK) {
 		error("bridge_get_data(RM_NodeCardListSize): %s",
 		      bg_err_str(rc));
 		rc = SLURM_ERROR;
@@ -357,8 +357,8 @@ static int _test_down_nodecards(rm_BP_t *bp_ptr, bool slurmctld_locked)
 			}
 		}
 
-		if(_test_nodecard_state(ncard, i, node_name, slurmctld_locked)
-		   != SLURM_SUCCESS)
+		if (_test_nodecard_state(ncard, i, node_name, slurmctld_locked)
+		    != SLURM_SUCCESS)
 			marked_down++;
 	}
 
@@ -369,7 +369,7 @@ static int _test_down_nodecards(rm_BP_t *bp_ptr, bool slurmctld_locked)
 	   bluegene.conf file that gives you an option as to have this
 	   happen or not automatically.
 	*/
-/* 	if(ionode_bitmap) { */
+/* 	if (ionode_bitmap) { */
 /* 		info("got ionode_bitmap"); */
 
 /* 		bit_not(ionode_bitmap); */
@@ -381,10 +381,10 @@ static int _test_down_nodecards(rm_BP_t *bp_ptr, bool slurmctld_locked)
 /* 		slurm_mutex_lock(&block_state_mutex); */
 /* 		itr = list_iterator_create(bg_lists->main); */
 /* 		while ((bg_record = list_next(itr))) { */
-/* 			if(bg_record->job_running != BLOCK_ERROR_STATE) */
+/* 			if (bg_record->job_running != BLOCK_ERROR_STATE) */
 /* 				continue; */
 
-/* 			if(!bit_test(bg_record->bitmap, bp_bit)) */
+/* 			if (!bit_test(bg_record->bitmap, bp_bit)) */
 /* 				continue; */
 /* 			info("bringing %s back to service", */
 /* 			     bg_record->bg_block_id); */
@@ -398,10 +398,11 @@ static int _test_down_nodecards(rm_BP_t *bp_ptr, bool slurmctld_locked)
 /* 		/\* FIX ME: This needs to call the opposite of */
 /* 		   slurm_drain_nodes which does not yet exist. */
 /* 		*\/ */
-/* 		if((ret = node_already_down(node_name))) { */
+/* 		if ((ret = node_already_down(node_name))) { */
 /* 			/\* means it was drained *\/ */
-/* 			if(ret == 2) { */
-/* 				/\* debug("node %s put back into service after " *\/ */
+/* 			if (ret == 2) { */
+/* 				/\* debug("node %s put back into
+ * 				service after " *\/ */
 /* /\* 				      "being in an error state", *\/ */
 /* /\* 				      node_name); *\/ */
 /* 			} */
@@ -409,15 +410,15 @@ static int _test_down_nodecards(rm_BP_t *bp_ptr, bool slurmctld_locked)
 /* 	} */
 
 clean_up:
-	if(ncard_list)
+	if (ncard_list)
 		bridge_free_nodecard_list(ncard_list);
 	xfree(node_name);
-/* 	if(ionode_bitmap) */
+/* 	if (ionode_bitmap) */
 /* 		FREE_NULL_BITMAP(ionode_bitmap); */
 	free(bp_id);
 
 	/* If we marked any nodecard down we need to state it here */
-	if((rc == SLURM_SUCCESS) && marked_down)
+	if ((rc == SLURM_SUCCESS) && marked_down)
 		rc = SLURM_ERROR;
 
 	return rc;
@@ -504,7 +505,7 @@ static void _test_down_switches(my_bluegene_t *my_bg)
 			continue;
 		}
 
-		if(!bp_id) {
+		if (!bp_id) {
 			error("No BPID was returned from database");
 			continue;
 		}
@@ -521,7 +522,7 @@ extern int node_already_down(char *node_name)
 	struct node_record *node_ptr = find_node_record(node_name);
 
 	if (node_ptr) {
-		if(IS_NODE_DRAIN(node_ptr))
+		if (IS_NODE_DRAIN(node_ptr))
 			return 2;
 		else if (IS_NODE_DOWN(node_ptr))
 			return 1;
@@ -590,17 +591,17 @@ extern int check_block_bp_states(char *bg_block_id, bool slurmctld_locked)
 		goto cleanup;
 	}
 
-	if(small) {
+	if (small) {
 		rm_nodecard_t *ncard = NULL;
 		char *node_name = NULL;
 
 		/* If this is a small block we can just check the
 		   nodecard list of the block.
 		*/
-		if((rc = bridge_get_data(block_ptr,
-					 RM_PartitionNodeCardNum,
-					 &cnt))
-		   != STATUS_OK) {
+		if ((rc = bridge_get_data(block_ptr,
+					  RM_PartitionNodeCardNum,
+					  &cnt))
+		    != STATUS_OK) {
 			error("bridge_get_data(RM_PartitionNodeCardNum): %s",
 			      bg_err_str(rc));
 			rc = SLURM_ERROR;
@@ -617,14 +618,14 @@ extern int check_block_bp_states(char *bg_block_id, bool slurmctld_locked)
 			goto cleanup;
 		}
 
-		if(!(node_name = _get_bp_node_name(bp_ptr))) {
+		if (!(node_name = _get_bp_node_name(bp_ptr))) {
 			rc = errno;
 			goto cleanup;
 		}
 
 		for(i=0; i<cnt; i++) {
 			int nc_id = 0;
-			if(i) {
+			if (i) {
 				if ((rc = bridge_get_data(
 					     block_ptr,
 					     RM_PartitionNextNodeCard,
@@ -656,9 +657,9 @@ extern int check_block_bp_states(char *bg_block_id, bool slurmctld_locked)
 			   break here since we are seeing if we can run.  If
 			   any nodecard is down this can't happen.
 			*/
-			if(_test_nodecard_state(
-				   ncard, nc_id, node_name, slurmctld_locked)
-			   != SLURM_SUCCESS) {
+			if (_test_nodecard_state(
+				    ncard, nc_id, node_name, slurmctld_locked)
+			    != SLURM_SUCCESS) {
 				rc = SLURM_ERROR;
 				break;
 			}
@@ -678,7 +679,7 @@ extern int check_block_bp_states(char *bg_block_id, bool slurmctld_locked)
 	}
 
 	for(i=0; i<cnt; i++) {
-		if(i) {
+		if (i) {
 			if ((rc = bridge_get_data(block_ptr,
 						  RM_PartitionNextBP,
 						  &bp_ptr))
@@ -704,8 +705,8 @@ extern int check_block_bp_states(char *bg_block_id, bool slurmctld_locked)
 		   break here since we are seeing if we can run.  If
 		   any nodecard is down this can't happen.
 		*/
-		if(_test_down_nodecards(bp_ptr, slurmctld_locked)
-		   != SLURM_SUCCESS) {
+		if (_test_down_nodecards(bp_ptr, slurmctld_locked)
+		    != SLURM_SUCCESS) {
 			rc = SLURM_ERROR;
 			break;
 		}