Commit a32a8504 authored by Guido Casati's avatar Guido Casati

Use a macro to initialize NR_SetupRelease structs

* introduced macro INIT_SETUP_RELEASE to optimize code in gnb_config.c
parent 56e510b2
......@@ -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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment