Commit b4395406 authored by Robert Schmidt's avatar Robert Schmidt

softmodem-common: Replace AssertFatal with static_assert

See also parent commit
parent acae0dc0
......@@ -116,9 +116,10 @@ void get_common_options(configmodule_interface_t *cfg, uint32_t execmask)
paramdef_t cmdline_logparams[] =CMDLINE_LOGPARAMS_DESC ;
checkedparam_t cmdline_log_CheckParams[] = CMDLINE_LOGPARAMS_CHECK_DESC;
int numlogparams = sizeofArray(cmdline_logparams);
AssertFatal(numlogparams == sizeofArray(cmdline_log_CheckParams), "Error in arrays size (%d!=%lu)\n", numlogparams, sizeofArray(cmdline_log_CheckParams));
static_assert(sizeofArray(cmdline_logparams) == sizeofArray(cmdline_log_CheckParams),
"cmdline_logparams and cmdline_log_CheckParams should have the same size");
int numlogparams = sizeofArray(cmdline_logparams);
config_set_checkfunctions(cmdline_logparams, cmdline_log_CheckParams, numlogparams);
config_get(cfg, cmdline_logparams, numlogparams, NULL);
......
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