From dcdd9ce364e3f044759043292b22b249283e2fae Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Wed, 3 Jun 2020 15:02:35 +0200 Subject: [PATCH] nothing special --- client/deps/jansson/load.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/client/deps/jansson/load.c b/client/deps/jansson/load.c index 7f3fa7458..52b9bed89 100644 --- a/client/deps/jansson/load.c +++ b/client/deps/jansson/load.c @@ -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 *result; - FILE *fp; - jsonp_error_init(error, path); if (path == NULL) { @@ -1049,15 +1047,13 @@ json_t *json_load_file(const char *path, size_t flags, json_error_t *error) { return NULL; } - fp = fopen(path, "rb"); + FILE *fp = fopen(path, "rb"); if (!fp) { - error_set(error, NULL, json_error_cannot_open_file, "unable to open %s: %s", - path, strerror(errno)); + error_set(error, NULL, json_error_cannot_open_file, "unable to open %s: %s", path, strerror(errno)); return NULL; } result = json_loadf(fp, flags, error); - fclose(fp); return result; }