summaryrefslogtreecommitdiff
path: root/src/libsystemd
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-04-04 12:24:38 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-04-12 11:44:57 +0200
commit673a1e6fb9ea2b61d97be45b8f9852c70a69778c (patch)
treebbba913ad7c9353ac80367d50bac29a8d96b7ce5 /src/libsystemd
parent2fe21124a6560fcf1ce3b0a3004baa9bb45d1e0b (diff)
downloadsystemd-673a1e6fb9ea2b61d97be45b8f9852c70a69778c.tar.gz
Add fmemopen_unlocked() and use unlocked ops in fuzzers and some other tests
This might make things marginially faster. I didn't benchmark though.
Diffstat (limited to 'src/libsystemd')
-rw-r--r--src/libsystemd/sd-bus/test-bus-marshal.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libsystemd/sd-bus/test-bus-marshal.c b/src/libsystemd/sd-bus/test-bus-marshal.c
index 1e9810ce4f..ade16e532d 100644
--- a/src/libsystemd/sd-bus/test-bus-marshal.c
+++ b/src/libsystemd/sd-bus/test-bus-marshal.c
@@ -20,6 +20,7 @@
#include "bus-util.h"
#include "escape.h"
#include "fd-util.h"
+#include "fileio.h"
#include "log.h"
#include "tests.h"
#include "util.h"
@@ -189,7 +190,7 @@ int main(int argc, char *argv[]) {
bus_message_dump(m, stdout, BUS_MESSAGE_DUMP_WITH_HEADER);
- ms = open_memstream(&first, &first_size);
+ ms = open_memstream_unlocked(&first, &first_size);
bus_message_dump(m, ms, 0);
fflush(ms);
assert_se(!ferror(ms));
@@ -245,7 +246,7 @@ int main(int argc, char *argv[]) {
bus_message_dump(m, stdout, BUS_MESSAGE_DUMP_WITH_HEADER);
fclose(ms);
- ms = open_memstream(&second, &second_size);
+ ms = open_memstream_unlocked(&second, &second_size);
bus_message_dump(m, ms, 0);
fflush(ms);
assert_se(!ferror(ms));
@@ -351,7 +352,7 @@ int main(int argc, char *argv[]) {
assert_se(r >= 0);
fclose(ms);
- ms = open_memstream(&third, &third_size);
+ ms = open_memstream_unlocked(&third, &third_size);
bus_message_dump(copy, ms, 0);
fflush(ms);
assert_se(!ferror(ms));