Skip to content
Snippets Groups Projects
Commit 48f1c7a8 authored by schneider's avatar schneider
Browse files

feat(config): Don't write if new string is equal to old string

parent 8fb680c1
No related branches found
No related tags found
1 merge request!406Read date/time from iOS device
......@@ -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)
);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment