Skip to content
Snippets Groups Projects
Commit 4f5b9645 authored by Daniel Salzman's avatar Daniel Salzman Committed by Libor Peltan
Browse files

conf: add conf_id_fix_default function

parent ac5d6999
Branches
Tags
1 merge request!672Kasp refactor
......@@ -530,6 +530,25 @@ char* conf_abs_path(
const char *base_dir
);
/*!
* Ensures empty 'default' identifier value.
*
* \param[in] val Item value.
*
* \return Empty item value.
*/
static inline void conf_id_fix_default(conf_val_t *val)
{
if (val->code != KNOT_EOK) {
conf_val_t empty = {
.item = val->item,
.code = KNOT_EOK
};
*val = empty;
}
}
/*!
* Gets the module identifier value of the item.
*
......
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