From 673a1e6fb9ea2b61d97be45b8f9852c70a69778c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 4 Apr 2019 12:24:38 +0200 Subject: Add fmemopen_unlocked() and use unlocked ops in fuzzers and some other tests This might make things marginially faster. I didn't benchmark though. --- src/test/test-json.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/test/test-json.c') diff --git a/src/test/test-json.c b/src/test/test-json.c index 9b8a2a9422..8bd6a7221c 100644 --- a/src/test/test-json.c +++ b/src/test/test-json.c @@ -4,6 +4,7 @@ #include "alloc-util.h" #include "fd-util.h" +#include "fileio.h" #include "json-internal.h" #include "json.h" #include "string-util.h" @@ -358,7 +359,7 @@ static void test_source(void) { "%s" "--- original end ---\n", data); - assert_se(f = fmemopen((void*) data, strlen(data), "r")); + assert_se(f = fmemopen_unlocked((void*) data, strlen(data), "r")); assert_se(json_parse_file(f, "waldo", &v, NULL, NULL) >= 0); -- cgit v1.2.1