From 7497fb940e9fea441578867a279653e19a8dd0b5 Mon Sep 17 00:00:00 2001
From: David Bigagli <david@schedmd.com>
Date: Mon, 15 Dec 2014 15:24:39 -0800
Subject: [PATCH] Revert "Commit 38068d21 expanded the reason for unavailable
 jobs but" as it may cause core dumo in squeue.

This reverts commit 322c783cc437800052827d524e653313d2bed9b6.
---
 src/squeue/print.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/squeue/print.c b/src/squeue/print.c
index a18ded03ee7..b2fa51d3d40 100644
--- a/src/squeue/print.c
+++ b/src/squeue/print.c
@@ -351,7 +351,7 @@ int print_job_from_format(squeue_job_rec_t *job_rec_ptr, List list)
 		xfree(job_rec_ptr->job_ptr->partition);
 		job_rec_ptr->job_ptr->partition = xstrdup(job_rec_ptr->
 							  part_name);
-
+		
 	}
 	if (job_rec_ptr->job_ptr->array_task_str && params.array_flag) {
 		if (max_array_size == -1)
@@ -846,8 +846,6 @@ int _print_job_schednodes(job_info_t * job, int width, bool right, char* suffix)
 int _print_job_reason_list(job_info_t * job, int width, bool right,
 		char* suffix)
 {
-	int l;
-
 	if (job == NULL) {	/* Print the Header instead */
 		char *title = "NODELIST(REASON)";
 		if (params.cluster_flags & CLUSTER_FLAG_BG)
@@ -862,8 +860,7 @@ int _print_job_reason_list(job_info_t * job, int width, bool right,
 			reason = job->state_desc;
 		else
 			reason = job_reason_string(job->state_reason);
-		l = strlen(reason) + 3; /* 3 = () + "" */
-		snprintf(id, l, "(%s)", reason);
+		snprintf(id, FORMAT_STRING_SIZE, "(%s)", reason);
 		_print_str(id, width, right, true);
 	} else {
 		char *nodes = xstrdup(job->nodes);
-- 
GitLab