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:
parent
b1a15f50b2
commit
312bddfe17
1 changed files with 2 additions and 8 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue