Add fmemopen_unlocked() and use unlocked ops in fuzzers and some other tests

This might make things marginially faster. I didn't benchmark though.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2019-04-12 11:44:57 +02:00
parent 2fe21124a6
commit 673a1e6fb9
14 changed files with 40 additions and 30 deletions
+1 -1
View File
@@ -298,7 +298,7 @@ static int boot_entry_load_unified(
if (!k)
return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Path is not below root: %s", path);
f = fmemopen((void*) osrelease, strlen(osrelease), "r");
f = fmemopen_unlocked((void*) osrelease, strlen(osrelease), "r");
if (!f)
return log_error_errno(errno, "Failed to open os-release buffer: %m");