X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=src%2Flibsystemd%2Fsd-bus%2Ftest-bus-marshal.c;h=c647f0ff128e697cef593a47f6348a7546488168;hb=0c697941389b7379c4471bc0a067ede02814bc57;hp=b9d1ea5217febb7d9bf6a2c1cfd61ecd8c2d66e9;hpb=d90833c93c5fd171440d0d5bbe42f5aab88e393f;p=thirdparty%2Fsystemd.git
diff --git a/src/libsystemd/sd-bus/test-bus-marshal.c b/src/libsystemd/sd-bus/test-bus-marshal.c
index b9d1ea5217f..c647f0ff128 100644
--- a/src/libsystemd/sd-bus/test-bus-marshal.c
+++ b/src/libsystemd/sd-bus/test-bus-marshal.c
@@ -1,32 +1,15 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
+/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
- Copyright 2013 Lennart Poettering
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with systemd; If not, see .
***/
#include
#include
-#ifdef HAVE_GLIB
+#if HAVE_GLIB
#include
#endif
-#ifdef HAVE_DBUS
+#if HAVE_DBUS
#include
#endif
@@ -139,7 +122,7 @@ int main(int argc, char *argv[]) {
double dbl;
uint64_t u64;
- r = sd_bus_default_system(&bus);
+ r = sd_bus_default_user(&bus);
if (r < 0)
return EXIT_TEST_SKIP;
@@ -198,7 +181,7 @@ int main(int argc, char *argv[]) {
r = sd_bus_message_append(m, "a(stdo)", 1, "foo", 815ULL, 47.0, "/");
assert_se(r >= 0);
- r = bus_message_seal(m, 4711, 0);
+ r = sd_bus_message_seal(m, 4711, 0);
assert_se(r >= 0);
bus_message_dump(m, stdout, BUS_MESSAGE_DUMP_WITH_HEADER);
@@ -217,7 +200,8 @@ int main(int argc, char *argv[]) {
log_info("message size = %zu, contents =\n%s", sz, h);
free(h);
-#ifdef HAVE_GLIB
+#if HAVE_GLIB
+#ifndef __SANITIZE_ADDRESS__
{
GDBusMessage *g;
char *p;
@@ -233,8 +217,9 @@ int main(int argc, char *argv[]) {
g_object_unref(g);
}
#endif
+#endif
-#ifdef HAVE_DBUS
+#if HAVE_DBUS
{
DBusMessage *w;
DBusError error;
@@ -361,7 +346,7 @@ int main(int argc, char *argv[]) {
r = sd_bus_message_copy(copy, m, true);
assert_se(r >= 0);
- r = bus_message_seal(copy, 4712, 0);
+ r = sd_bus_message_seal(copy, 4712, 0);
assert_se(r >= 0);
fclose(ms);