From 1ff2ddfea0dda788b96b1854cdb26ffc437171e8 Mon Sep 17 00:00:00 2001
From: Danny Auble <da@schedmd.com>
Date: Tue, 16 Feb 2016 16:38:28 -0800
Subject: [PATCH] Combine redundant code.

---
 src/sreport/cluster_reports.c | 10 ----------
 src/sreport/resv_reports.c    |  9 ---------
 src/sreport/sreport.h         | 10 ++++++++++
 3 files changed, 10 insertions(+), 19 deletions(-)

diff --git a/src/sreport/cluster_reports.c b/src/sreport/cluster_reports.c
index ec22807225f..aab51677790 100644
--- a/src/sreport/cluster_reports.c
+++ b/src/sreport/cluster_reports.c
@@ -60,16 +60,6 @@ enum {
 	PRINT_CLUSTER_TRES_NAME,
 };
 
-typedef enum {
-	GROUP_BY_ACCOUNT,
-	GROUP_BY_ACCOUNT_JOB_SIZE,
-	GROUP_BY_ACCOUNT_JOB_SIZE_DURATION,
-	GROUP_BY_USER,
-	GROUP_BY_USER_JOB_SIZE,
-	GROUP_BY_USER_JOB_SIZE_DURATION,
-	GROUP_BY_NONE
-} report_grouping_t;
-
 static List print_fields_list = NULL; /* types are of print_field_t */
 
 
diff --git a/src/sreport/resv_reports.c b/src/sreport/resv_reports.c
index 9a19fbb429a..e6047ae9a09 100644
--- a/src/sreport/resv_reports.c
+++ b/src/sreport/resv_reports.c
@@ -57,15 +57,6 @@ enum {
 	PRINT_RESV_TRES_USAGE,
 };
 
-typedef enum {
-	GROUP_BY_ACCOUNT,
-	GROUP_BY_ACCOUNT_JOB_SIZE,
-	GROUP_BY_ACCOUNT_JOB_SIZE_DURATION,
-	GROUP_BY_USER,
-	GROUP_BY_USER_JOB_SIZE,
-	GROUP_BY_USER_JOB_SIZE_DURATION,
-	GROUP_BY_NONE
-} report_grouping_t;
 
 static List print_fields_list = NULL; /* types are of print_field_t */
 
diff --git a/src/sreport/sreport.h b/src/sreport/sreport.h
index a9519cd5719..8fe41cea4e4 100644
--- a/src/sreport/sreport.h
+++ b/src/sreport/sreport.h
@@ -90,6 +90,16 @@
 #define CKPT_WAIT	10
 #define	MAX_INPUT_FIELDS 128
 
+typedef enum {
+	GROUP_BY_ACCOUNT,
+	GROUP_BY_ACCOUNT_JOB_SIZE,
+	GROUP_BY_ACCOUNT_JOB_SIZE_DURATION,
+	GROUP_BY_USER,
+	GROUP_BY_USER_JOB_SIZE,
+	GROUP_BY_USER_JOB_SIZE_DURATION,
+	GROUP_BY_NONE
+} report_grouping_t;
+
 extern slurmdb_report_time_format_t time_format;
 extern char *time_format_string;
 extern char *command_name;
-- 
GitLab