|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 5/7] tools/utils: move XLU_ConfigSetting & xlu__cfg_set_free() to libxl_cfg.c
XLU_ConfigSetting is only used inside libxl_cfg.c, so no need for it in
the internal header.
Similarly, xlu__cfg_set_free() is no longer used outside libxl_cfg.c, so
remove from header and redeclare static.
Signed-off-by: Elliott Mitchell <ehem+xen@xxxxxxx>
---
tools/libs/util/libxlu_cfg.c | 10 +++++++++-
tools/libs/util/libxlu_cfg_i.h | 1 -
tools/libs/util/libxlu_internal.h | 8 --------
3 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/tools/libs/util/libxlu_cfg.c b/tools/libs/util/libxlu_cfg.c
index b2947cbfc9..2979d775a6 100644
--- a/tools/libs/util/libxlu_cfg.c
+++ b/tools/libs/util/libxlu_cfg.c
@@ -25,6 +25,14 @@
#include "libxlu_cfg_l.h"
#include "libxlu_cfg_i.h"
+typedef struct XLU_ConfigSetting { /* transparent */
+ struct XLU_ConfigSetting *next;
+ char *name;
+ XLU_ConfigValue *value;
+ enum XLU_Operation op;
+ int lineno;
+} XLU_ConfigSetting;
+
struct XLU_Config {
XLU_ConfigSetting *settings;
FILE *report;
@@ -155,7 +163,7 @@ void xlu__cfg_value_free(XLU_ConfigValue *value)
free(value);
}
-void xlu__cfg_set_free(XLU_ConfigSetting *set) {
+static void xlu__cfg_set_free(XLU_ConfigSetting *set) {
if (!set) return;
free(set->name);
xlu__cfg_value_free(set->value);
diff --git a/tools/libs/util/libxlu_cfg_i.h b/tools/libs/util/libxlu_cfg_i.h
index 3d1e4ed568..7193867422 100644
--- a/tools/libs/util/libxlu_cfg_i.h
+++ b/tools/libs/util/libxlu_cfg_i.h
@@ -26,7 +26,6 @@ enum XLU_Operation {
XLU_OP_ADDITION,
};
-void xlu__cfg_set_free(XLU_ConfigSetting *set);
void xlu__cfg_set_store(CfgParseContext*, char *name,
enum XLU_Operation op,
XLU_ConfigValue *val, int lineno);
diff --git a/tools/libs/util/libxlu_internal.h
b/tools/libs/util/libxlu_internal.h
index 2ef5eb7f5e..97303391c6 100644
--- a/tools/libs/util/libxlu_internal.h
+++ b/tools/libs/util/libxlu_internal.h
@@ -49,14 +49,6 @@ struct XLU_ConfigValue {
YYLTYPE loc;
};
-typedef struct XLU_ConfigSetting { /* transparent */
- struct XLU_ConfigSetting *next;
- char *name;
- XLU_ConfigValue *value;
- enum XLU_Operation op;
- int lineno;
-} XLU_ConfigSetting;
-
typedef struct {
XLU_Config *cfg;
int err, lexerrlineno, likely_python;
--
2.30.2
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |