From bf5920385f6afce8645a5c81f355d1426cfb2356 Mon Sep 17 00:00:00 2001 From: Erik Boasson Date: Fri, 5 Jul 2019 22:35:19 +0200 Subject: [PATCH] Account for DDSI_INCLUDE_SSM in parameterlist size The parameter list table indices ought to be a small as possible to avoid wasting space, and that means the index size is dependent on whether or not DDSI_INCLUDE_SSM is set. Signed-off-by: Erik Boasson --- src/core/ddsi/src/q_plist.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/ddsi/src/q_plist.c b/src/core/ddsi/src/q_plist.c index a109d74..607c8ec 100644 --- a/src/core/ddsi/src/q_plist.c +++ b/src/core/ddsi/src/q_plist.c @@ -1105,10 +1105,12 @@ struct piddesc_index { Sizes are such that the highest PID (without flags) in table are the last entry in the array. Checked by - nn_plist_init_tables. */ + nn_plist_init_tables. + + FIXME: should compute them at build-time */ #ifdef DDSI_INCLUDE_SSM static const struct piddesc *piddesc_omg_index[115]; -#else +#else /* status info is the highest */ static const struct piddesc *piddesc_omg_index[114]; #endif static const struct piddesc *piddesc_eclipse_index[19];