settings: line: simplify settings_line_len_calc()

This function was refactored several times due to many features (like
base64 encoding), which got deprecated over time. Simplify it a bit now.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
This commit is contained in:
Marcin Niestroj 2022-11-29 21:18:06 +01:00 committed by Carles Cufí
commit 312bddfe17

View file

@ -149,14 +149,8 @@ int settings_next_line_ctx(struct line_entry_ctx *entry_ctx)
int settings_line_len_calc(const char *name, size_t val_len)
{
int len;
/* <evalue> */
len = val_len;
/* <name>=<enc(value)> */
len += strlen(name) + 1;
return len;
/* <name>=<value> */
return strlen(name) + 1 + val_len;
}