Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Øyvind Kolås
firmware
Commits
81c0b221
Commit
81c0b221
authored
Oct 14, 2020
by
Rahix
Browse files
Merge 'Clear config before reloading'
Closes #211 See merge request
card10/firmware!411
parents
c6a8a430
539b02ec
Changes
1
Hide whitespace changes
Inline
Side-by-side
epicardium/modules/config.c
View file @
81c0b221
...
...
@@ -246,6 +246,21 @@ void load_config(void)
return
;
}
/* Clear any existing configuration */
/* Don't free the blocks as we are most likely
* going to re-use all of them. */
config_block
*
current
;
if
(
config_data
!=
NULL
)
{
current
=
config_data
;
while
(
true
)
{
memset
(
current
->
slots
,
0
,
sizeof
(
current
->
slots
));
if
(
current
->
next
==
NULL
)
{
break
;
}
current
=
current
->
next
;
}
}
char
buf
[
128
];
int
nread
;
parser_state
s
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment