]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/libsystemd/sd-bus/test-bus-benchmark.c
tree-wide: use -EBADF also in pipe initializers
[thirdparty/systemd.git] / src / libsystemd / sd-bus / test-bus-benchmark.c
index 2dd3d41a302a290b6c9409e26ce1292909d3ac2d..a402a70223a02d6d8c780b313ab48501cfc65ace 100644 (file)
@@ -1,18 +1,18 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/wait.h>
+#include <unistd.h>
 
 #include "sd-bus.h"
 
 #include "alloc-util.h"
 #include "bus-internal.h"
 #include "bus-kernel.h"
-#include "bus-util.h"
-#include "def.h"
+#include "constants.h"
 #include "fd-util.h"
 #include "missing_resource.h"
+#include "string-util.h"
 #include "time-util.h"
-#include "util.h"
 
 #define MAX_SIZE (2*1024*1024)
 
@@ -56,7 +56,7 @@ static void server(sd_bus *b, size_t *result) {
                         return;
 
                 } else if (!sd_bus_message_is_signal(m, NULL, NULL))
-                        assert_not_reached("Unknown method");
+                        assert_not_reached();
         }
 }
 
@@ -211,7 +211,7 @@ int main(int argc, char *argv[]) {
                 MODE_CHART,
         } mode = MODE_BISECT;
         Type type = TYPE_LEGACY;
-        int i, pair[2] = { -1, -1 };
+        int i, pair[2] = { -EBADF, -EBADF };
         _cleanup_free_ char *address = NULL, *server_name = NULL;
         _cleanup_close_ int bus_ref = -1;
         const char *unique;