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
48f1c7a8
Commit
48f1c7a8
authored
Oct 11, 2020
by
schneider
Browse files
feat(config): Don't write if new string is equal to old string
parent
8fb680c1
Changes
1
Hide whitespace changes
Inline
Side-by-side
epicardium/modules/config.c
View file @
48f1c7a8
...
...
@@ -507,6 +507,11 @@ int epic_config_set_string(const char *key, const char *value_in)
int
fd2
=
-
1
;
ret
=
epic_config_get_string
(
key
,
buf
,
sizeof
(
buf
));
if
(
ret
==
0
&&
strcmp
(
buf
,
value
)
==
0
)
{
/* Nothing to do: the values are the same. */
return
0
;
}
size_t
nread
=
read_config_offset
(
slot
->
value_offset
,
buf
,
sizeof
(
buf
)
);
...
...
Write
Preview
Supports
Markdown
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