mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
nothing special
This commit is contained in:
parent
d5731b3aec
commit
dcdd9ce364
1 changed files with 2 additions and 6 deletions
|
@ -1040,8 +1040,6 @@ json_t *json_loadfd(int input, size_t flags, json_error_t *error) {
|
||||||
|
|
||||||
json_t *json_load_file(const char *path, size_t flags, json_error_t *error) {
|
json_t *json_load_file(const char *path, size_t flags, json_error_t *error) {
|
||||||
json_t *result;
|
json_t *result;
|
||||||
FILE *fp;
|
|
||||||
|
|
||||||
jsonp_error_init(error, path);
|
jsonp_error_init(error, path);
|
||||||
|
|
||||||
if (path == NULL) {
|
if (path == NULL) {
|
||||||
|
@ -1049,15 +1047,13 @@ json_t *json_load_file(const char *path, size_t flags, json_error_t *error) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
fp = fopen(path, "rb");
|
FILE *fp = fopen(path, "rb");
|
||||||
if (!fp) {
|
if (!fp) {
|
||||||
error_set(error, NULL, json_error_cannot_open_file, "unable to open %s: %s",
|
error_set(error, NULL, json_error_cannot_open_file, "unable to open %s: %s", path, strerror(errno));
|
||||||
path, strerror(errno));
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = json_loadf(fp, flags, error);
|
result = json_loadf(fp, flags, error);
|
||||||
|
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue