]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/libsystemd/sd-bus/bus-introspect.c
Add open_memstream_unlocked() wrapper
[thirdparty/systemd.git] / src / libsystemd / sd-bus / bus-introspect.c
index 29a5ef715e41545160fb4ba61845dfaf3ad00f16..022eddb10f66a1e90675b6c5b84fafb78dd34e79 100644 (file)
@@ -1,7 +1,5 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
-#include <stdio_ext.h>
-
 #include "bus-internal.h"
 #include "bus-introspect.h"
 #include "bus-objects.h"
@@ -18,12 +16,10 @@ int introspect_begin(struct introspect *i, bool trusted) {
         zero(*i);
         i->trusted = trusted;
 
-        i->f = open_memstream(&i->introspection, &i->size);
+        i->f = open_memstream_unlocked(&i->introspection, &i->size);
         if (!i->f)
                 return -ENOMEM;
 
-        (void) __fsetlocking(i->f, FSETLOCKING_BYCALLER);
-
         fputs(BUS_INTROSPECT_DOCTYPE
               "<node>\n", i->f);