return false;
}
+ char dummy[8] = {0}; // The maximum entry size in struct conf.
+ if (!item->parser(value, (void *)dummy, errmsg)
+ || (item->verifier && !item->verifier(value, errmsg))) {
+ return false;
+ }
+
FILE *infile = fopen(path, "r");
if (!infile) {
*errmsg = format("%s: %s", path, strerror(errno));
char *data;
create_file("ccache.conf", "path = vanilla\n");
- CHECKM(conf_set_value_in_file("ccache.conf", "stats", "chocolate", &errmsg),
+ CHECKM(conf_set_value_in_file("ccache.conf", "compiler", "chocolate", &errmsg),
errmsg);
data = read_text_file("ccache.conf", 0);
CHECK(data);
- CHECK_STR_EQ_FREE2("path = vanilla\nstats = chocolate\n", data);
+ CHECK_STR_EQ_FREE2("path = vanilla\ncompiler = chocolate\n", data);
}
TEST(conf_set_existing_value)