X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Flookups%2Fjson.c;h=9b1fe78ed3b4e9d17e20ee8863d74563ac096302;hb=8f0d0a3138e138ffa6bcc94c8378f5eb22573f0e;hp=58f9b6ae6f2c79075b370885e409d57b987d4afd;hpb=9f4001740f061f29c65835c6f7efcab50c27db13;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/lookups/json.c b/src/src/lookups/json.c index 58f9b6ae6..9b1fe78ed 100644 --- a/src/src/lookups/json.c +++ b/src/src/lookups/json.c @@ -2,7 +2,7 @@ * Exim - an Internet mail transport agent * *************************************************/ -/* Copyright (c) Jeremy Harris 2019 */ +/* Copyright (c) Jeremy Harris 2019-2020 */ /* See the file NOTICE for conditions of use and distribution. */ #include "../exim.h" @@ -47,12 +47,7 @@ FILE * f; json_set_alloc_funcs(json_malloc, json_free); if (!(f = Ufopen(filename, "rb"))) - { - int save_errno = errno; - *errmsg = string_open_failed(errno, "%s for json search", filename); - errno = save_errno; - return NULL; - } + *errmsg = string_open_failed("%s for json search", filename); return f; } @@ -89,9 +84,6 @@ json_error_t jerr; uschar * key; int sep = 0; -length = length; /* Keep picky compilers happy */ -do_cache = do_cache; /* Keep picky compilers happy */ - rewind(f); if (!(j = json_loadf(f, 0, &jerr))) {