Use a macro to initialize NR_SetupRelease structs

* introduced macro INIT_SETUP_RELEASE to optimize code in gnb_config.c
This commit is contained in:
Guido Casati
2024-10-02 11:36:43 +02:00
parent 56e510b2f2
commit a32a8504c9
+10
View File
@@ -95,6 +95,16 @@
#include "nfapi/oai_integration/aerial/fapi_vnf_p5.h"
#endif
/**
* @brief Helper define to allocate and initialize SetupRelease structures
*/
#define INIT_SETUP_RELEASE(type, element) \
do { \
element = calloc_or_fail(1, sizeof(*element)); \
(element)->present = NR_SetupRelease_##type##_PR_setup; \
(element)->choice.setup = CALLOC(1, sizeof(*((element)->choice.setup))); \
} while (0)
extern uint16_t sf_ahead;
void prepare_scc(NR_ServingCellConfigCommon_t *scc) {