diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-03-19 21:31:04 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-03-19 21:38:46 +0100 |
commit | f41df6954ca1913aba1b1596c8f9ab4f74fa61dc (patch) | |
tree | a41b09c1022d4695e701071264256b1494e7a775 /src/libsystemd/sd-bus | |
parent | sd-bus: support SD_BUS_DEFAULT* and don't crash in functions where bus is opt... (diff) | |
download | systemd-f41df6954ca1913aba1b1596c8f9ab4f74fa61dc.tar.xz systemd-f41df6954ca1913aba1b1596c8f9ab4f74fa61dc.zip |
sd-bus: whitespace adjustments
Diffstat (limited to '')
-rw-r--r-- | src/libsystemd/sd-bus/bus-convenience.c | 5 | ||||
-rw-r--r-- | src/libsystemd/sd-bus/bus-message.c | 4 | ||||
-rw-r--r-- | src/libsystemd/sd-bus/sd-bus.c | 3 |
3 files changed, 5 insertions, 7 deletions
diff --git a/src/libsystemd/sd-bus/bus-convenience.c b/src/libsystemd/sd-bus/bus-convenience.c index a1d81a1315..89547a252d 100644 --- a/src/libsystemd/sd-bus/bus-convenience.c +++ b/src/libsystemd/sd-bus/bus-convenience.c @@ -296,7 +296,10 @@ _public_ int sd_bus_get_property( goto fail; } - r = sd_bus_call_method(bus, destination, path, "org.freedesktop.DBus.Properties", "Get", error, &rep, "ss", strempty(interface), member); + r = sd_bus_call_method(bus, destination, path, + "org.freedesktop.DBus.Properties", "Get", + error, &rep, + "ss", strempty(interface), member); if (r < 0) return r; diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c index b8f91f4434..62c34d9312 100644 --- a/src/libsystemd/sd-bus/bus-message.c +++ b/src/libsystemd/sd-bus/bus-message.c @@ -585,15 +585,13 @@ _public_ int sd_bus_message_new( sd_bus_message **m, uint8_t type) { - sd_bus_message *t; - assert_return(bus, -ENOTCONN); assert_return(bus = bus_resolve(bus), -ENOPKG); assert_return(bus->state != BUS_UNSET, -ENOTCONN); assert_return(m, -EINVAL); assert_return(type < _SD_BUS_MESSAGE_TYPE_MAX, -EINVAL); - t = malloc0(ALIGN(sizeof(sd_bus_message)) + sizeof(struct bus_header)); + sd_bus_message *t = malloc0(ALIGN(sizeof(sd_bus_message)) + sizeof(struct bus_header)); if (!t) return -ENOMEM; diff --git a/src/libsystemd/sd-bus/sd-bus.c b/src/libsystemd/sd-bus/sd-bus.c index 58c4571819..5cbd01594c 100644 --- a/src/libsystemd/sd-bus/sd-bus.c +++ b/src/libsystemd/sd-bus/sd-bus.c @@ -504,7 +504,6 @@ static int synthesize_connected_signal(sd_bus *bus) { } void bus_set_state(sd_bus *bus, enum bus_state state) { - static const char * const table[_BUS_STATE_MAX] = { [BUS_UNSET] = "UNSET", [BUS_WATCH_BIND] = "WATCH_BIND", @@ -2287,7 +2286,6 @@ fail: } _public_ int sd_bus_get_fd(sd_bus *bus) { - assert_return(bus, -EINVAL); assert_return(bus = bus_resolve(bus), -ENOPKG); assert_return(bus->input_fd == bus->output_fd, -EPERM); @@ -4019,7 +4017,6 @@ _public_ int sd_bus_get_scope(sd_bus *bus, const char **scope) { } _public_ int sd_bus_get_address(sd_bus *bus, const char **address) { - assert_return(bus, -EINVAL); assert_return(bus = bus_resolve(bus), -ENOPKG); assert_return(address, -EINVAL); |