From f557717e917124ed68e655976b1abd0c0361559d Mon Sep 17 00:00:00 2001
From: David Bigagli <david@schedmd.com>
Date: Mon, 13 Apr 2015 13:18:36 -0700
Subject: [PATCH] Fix coding style.

---
 slurm/slurm.h.in   |  6 ++++--
 src/api/job_info.c | 34 ++++++++++++++++++++++------------
 2 files changed, 26 insertions(+), 14 deletions(-)

diff --git a/slurm/slurm.h.in b/slurm/slurm.h.in
index 2de52a63e27..accacddc162 100644
--- a/slurm/slurm.h.in
+++ b/slurm/slurm.h.in
@@ -3342,7 +3342,8 @@ extern int slurm_job_cpus_allocated_on_node PARAMS(
  * RET 0 on success or -1 on error
  */
 extern int slurm_job_cpus_allocated_str_on_node_id PARAMS(
-	(char *cpus, size_t cpus_len, job_resources_t *job_resrcs_ptr, int node_id));
+	(char *cpus, size_t cpus_len,
+	 job_resources_t *job_resrcs_ptr, int node_id));
 
 /*
  * slurm_job_cpus_allocated_str_on_node -
@@ -3355,7 +3356,8 @@ extern int slurm_job_cpus_allocated_str_on_node_id PARAMS(
  * RET 0 on success or -1 on error
  */
 extern int slurm_job_cpus_allocated_str_on_node PARAMS(
-	(char *cpus, size_t cpus_len, job_resources_t *job_resrcs_ptr, const char *node_name));
+	(char *cpus, size_t cpus_len,
+	 job_resources_t *job_resrcs_ptr, const char *node_name));
 
 /*****************************************************************************\
  *	SLURM JOB CONTROL CONFIGURATION READ/PRINT/UPDATE FUNCTIONS
diff --git a/src/api/job_info.c b/src/api/job_info.c
index 0e8c0b18a07..d701d8b5e3f 100644
--- a/src/api/job_info.c
+++ b/src/api/job_info.c
@@ -1598,11 +1598,13 @@ extern int slurm_job_cpus_allocated_on_node(job_resources_t *job_resrcs_ptr,
 	return slurm_job_cpus_allocated_on_node_id(job_resrcs_ptr, node_id);
 }
 
-extern int slurm_job_cpus_allocated_str_on_node_id(
-	char *cpus, size_t cpus_len, job_resources_t *job_resrcs_ptr, int node_id)
+int slurm_job_cpus_allocated_str_on_node_id(char *cpus,
+					    size_t cpus_len,
+					    job_resources_t *job_resrcs_ptr,
+					    int node_id)
 {
-	int start_node=-1; /* start with -1 less so the array reps
-			    * lines up correctly */
+	int start_node = -1; /* start with -1 less so the array reps
+			      * lines up correctly */
 	uint32_t threads = 1;
 	int inx = 0;
 	bitstr_t *cpu_bitmap;
@@ -1611,19 +1613,22 @@ extern int slurm_job_cpus_allocated_str_on_node_id(
 	if (!job_resrcs_ptr || node_id < 0)
 		slurm_seterrno_ret(EINVAL);
 
-	// find index in sock_core_rep_count[] for this node id
+	/* find index in sock_core_rep_count[] for this node id
+	 */
 	do {
 		start_node += job_resrcs_ptr->sock_core_rep_count[inx];
 		inx++;
 	} while (start_node < node_id);
-	// back to previous index since inx is always one step further
-	// after previous loop
+	/* back to previous index since inx is always one step further
+	 * after previous loop
+	 */
 	inx--;
 
 	bit_reps = job_resrcs_ptr->sockets_per_node[inx] *
-		   job_resrcs_ptr->cores_per_socket[inx];
+		job_resrcs_ptr->cores_per_socket[inx];
 
-	// get the number of threads per core on this node
+	/* get the number of threads per core on this node
+	 */
 	if (job_node_ptr)
 		threads = job_node_ptr->node_array[node_id].threads;
 
@@ -1642,8 +1647,10 @@ extern int slurm_job_cpus_allocated_str_on_node_id(
 	return SLURM_SUCCESS;
 }
 
-extern int slurm_job_cpus_allocated_str_on_node(
-	char *cpus, size_t cpus_len, job_resources_t *job_resrcs_ptr, const char *node)
+int slurm_job_cpus_allocated_str_on_node(char *cpus,
+					 size_t cpus_len,
+					 job_resources_t *job_resrcs_ptr,
+					 const char *node)
 {
 	hostlist_t node_hl;
 	int node_id;
@@ -1657,5 +1664,8 @@ extern int slurm_job_cpus_allocated_str_on_node(
 	if (node_id == -1)
 		return SLURM_ERROR;
 
-	return slurm_job_cpus_allocated_str_on_node_id(cpus, cpus_len, job_resrcs_ptr, node_id);
+	return slurm_job_cpus_allocated_str_on_node_id(cpus,
+						       cpus_len,
+						       job_resrcs_ptr,
+						       node_id);
 }
-- 
GitLab