Code Clean

This commit is contained in:
mwalker33
2020-04-06 16:20:57 +10:00
parent 8fea6cddf7
commit 7b14fd7212
5 changed files with 24 additions and 21 deletions

View File

@@ -38,6 +38,8 @@
// this define is needed for scandir/alphasort to work
#define _GNU_SOURCE
#include "fileutils.h"
#include "settings.h"
#include <dirent.h>
#include <ctype.h>
@@ -52,9 +54,6 @@
#define PATH_MAX_LENGTH 200
extern void JsonLoadSettingsCallback (json_t *root);
extern void JsonSaveSettingsCallback (json_t *root);
struct wave_info_t {
char signature[4];
uint32_t filesize;
@@ -429,7 +428,7 @@ int saveFileJSON(const char *preferredName, JSONFileType ftype, uint8_t *data, s
}
break;
case jsfSettings:
JsonSaveSettingsCallback (root);
settings_save_callback (root);
break;
default:
break;
@@ -870,7 +869,7 @@ int loadFileJSON(const char *preferredName, void *data, size_t maxdatalen, size_
*datalen = sptr;
}
if (!strcmp(ctype,"settings")) {
JsonLoadSettingsCallback (root);
settings_load_callback (root);
}
PrintAndLogEx(SUCCESS, "loaded from JSON file " _YELLOW_("%s"), fileName);
out: