Update to new rjp api
This commit is contained in:
parent
bbce4dc8fe
commit
26bd685296
@ -77,7 +77,7 @@ RJP_value* read_restore_file(const char* file){
|
||||
i = fread(file_contents, filesize, 1, fp);
|
||||
fclose(fp);
|
||||
file_contents[filesize] = 0;
|
||||
RJP_value* root = rjp_parse(file_contents);
|
||||
RJP_value* root = rjp_parse(file_contents, RJP_PARSE_NONE, NULL);
|
||||
free(file_contents);
|
||||
return root;
|
||||
}
|
||||
@ -149,7 +149,7 @@ void save_restore_file(struct string_array* devices, struct arg_values* args){
|
||||
}
|
||||
for(struct arg_values* curr = args->next;curr;curr = curr->next){
|
||||
if(curr->operation == OP_SET){
|
||||
RJP_value* newmem = rjp_add_member_key_copy(rf, curr->device, 0);
|
||||
RJP_value* newmem = rjp_new_member(rf, curr->device, 0);
|
||||
rjp_set_float(newmem, curr->delta);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user