From 0bdfea309ac0d2ab6e2405516361dcc3477dbacc Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Date: Mon, 20 Mar 2023 15:41:58 +0100 Subject: [PATCH] Simplify pcf_labels type --- src/emu/kernel/setup.c | 4 ++-- src/emu/model_pvt.c | 4 ++-- src/emu/model_pvt.h | 2 +- src/emu/nanos6/setup.c | 6 +++--- src/emu/nodes/setup.c | 4 ++-- src/emu/nosv/setup.c | 4 ++-- src/emu/ovni/setup.c | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/emu/kernel/setup.c b/src/emu/kernel/setup.c index 195385b..93906f4 100644 --- a/src/emu/kernel/setup.c +++ b/src/emu/kernel/setup.c @@ -42,8 +42,8 @@ static const struct pcf_value_label kernel_cs_values[] = { { -1, NULL }, }; -static const struct pcf_value_label (*pcf_labels[CH_MAX])[] = { - [CH_CS] = &kernel_cs_values, +static const struct pcf_value_label *pcf_labels[CH_MAX] = { + [CH_CS] = kernel_cs_values, }; static const long prv_flags[CH_MAX] = { diff --git a/src/emu/model_pvt.c b/src/emu/model_pvt.c index f3f27ef..b270317 100644 --- a/src/emu/model_pvt.c +++ b/src/emu/model_pvt.c @@ -13,12 +13,12 @@ static int create_values(const struct model_pvt_spec *pvt, struct pcf_type *t, int i) { - const struct pcf_value_label(*q)[] = pvt->label[i]; + const struct pcf_value_label *q = pvt->label[i]; if (q == NULL) return 0; - for (const struct pcf_value_label *p = *q; p->label != NULL; p++) + for (const struct pcf_value_label *p = q; p->label != NULL; p++) pcf_add_value(t, p->value, p->label); return 0; diff --git a/src/emu/model_pvt.h b/src/emu/model_pvt.h index b3a01d0..77a7e37 100644 --- a/src/emu/model_pvt.h +++ b/src/emu/model_pvt.h @@ -13,7 +13,7 @@ struct model_pvt_spec { const char **prefix; const char **suffix; const long *flags; - const struct pcf_value_label (**label)[]; + const struct pcf_value_label **label; }; #include "model_cpu.h" diff --git a/src/emu/nanos6/setup.c b/src/emu/nanos6/setup.c index 0988867..773a902 100644 --- a/src/emu/nanos6/setup.c +++ b/src/emu/nanos6/setup.c @@ -98,9 +98,9 @@ static const struct pcf_value_label nanos6_thread_type[] = { { -1, NULL }, }; -static const struct pcf_value_label (*pcf_labels[CH_MAX])[] = { - [CH_SUBSYSTEM] = &nanos6_ss_values, - [CH_THREAD] = &nanos6_thread_type, +static const struct pcf_value_label *pcf_labels[CH_MAX] = { + [CH_SUBSYSTEM] = nanos6_ss_values, + [CH_THREAD] = nanos6_thread_type, }; static const long prv_flags[CH_MAX] = { diff --git a/src/emu/nodes/setup.c b/src/emu/nodes/setup.c index 2bc7e42..c50d214 100644 --- a/src/emu/nodes/setup.c +++ b/src/emu/nodes/setup.c @@ -50,8 +50,8 @@ static const struct pcf_value_label nodes_ss_values[] = { { -1, NULL }, }; -static const struct pcf_value_label (*pcf_labels[CH_MAX])[] = { - [CH_SUBSYSTEM] = &nodes_ss_values, +static const struct pcf_value_label *pcf_labels[CH_MAX] = { + [CH_SUBSYSTEM] = nodes_ss_values, }; static const long prv_flags[CH_MAX] = { diff --git a/src/emu/nosv/setup.c b/src/emu/nosv/setup.c index 12eb06c..2fb500a 100644 --- a/src/emu/nosv/setup.c +++ b/src/emu/nosv/setup.c @@ -77,8 +77,8 @@ static const struct pcf_value_label nosv_ss_values[] = { { -1, NULL }, }; -static const struct pcf_value_label (*pcf_labels[CH_MAX])[] = { - [CH_SUBSYSTEM] = &nosv_ss_values, +static const struct pcf_value_label *pcf_labels[CH_MAX] = { + [CH_SUBSYSTEM] = nosv_ss_values, }; static const long prv_flags[CH_MAX] = { diff --git a/src/emu/ovni/setup.c b/src/emu/ovni/setup.c index ade7853..00f898a 100644 --- a/src/emu/ovni/setup.c +++ b/src/emu/ovni/setup.c @@ -41,8 +41,8 @@ static const struct pcf_value_label flushing_values[] = { { -1, NULL }, }; -static const struct pcf_value_label (*pcf_labels[CH_MAX])[] = { - [CH_FLUSH] = &flushing_values, +static const struct pcf_value_label *pcf_labels[CH_MAX] = { + [CH_FLUSH] = flushing_values, }; static const long prv_flags[CH_MAX] = {