hot fix warning in fprintf
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Make (push) Successful in 9s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-CMake (push) Successful in 13s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Meson (push) Successful in 13s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Make (push) Successful in 9s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-CMake (push) Successful in 13s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Meson (push) Successful in 13s
This commit is contained in:
1 parent
56d670c9b6
commit
b0758c5499
1 file changed
+3
-3
+3
-3
@@ -156,7 +156,7 @@ void cm_save_config(ConfigManager *cm) {
|
||||
pthread_mutex_lock(&(cm->config_file_mutex));
|
||||
FILE *configfile = fopen(cm->config_file_name, "w+");
|
||||
char *configvalue = cJSON_Print(cm->config);
|
||||
fprintf(configfile, configvalue);
|
||||
fprintf(configfile, "%s", configvalue);
|
||||
fclose(configfile);
|
||||
free(configvalue);
|
||||
pthread_mutex_unlock(&(cm->config_file_mutex));
|
||||
@@ -165,8 +165,8 @@ void cm_save_config_to_file(ConfigManager *cm, const char *filename) {
|
||||
pthread_mutex_lock(&(cm->config_file_mutex));
|
||||
FILE *configfile = fopen(filename, "w+");
|
||||
char *configvalue = cJSON_Print(cm->config);
|
||||
fprintf(configfile, configvalue);
|
||||
fprintf(configfile, "%s", configvalue);
|
||||
fclose(configfile);
|
||||
free(configvalue);
|
||||
pthread_mutex_unlock(&(cm->config_file_mutex));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user