summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Mack <github@zonque.org>2015-08-08 11:05:20 +0200
committerDaniel Mack <github@zonque.org>2015-08-08 11:05:20 +0200
commit0578ded9579b5cd76ea1a46f7a1a41d3d75b5f5b (patch)
treec4b188defbf7aa93a86c98405031ba0cfe5067d1 /src
parent9db81db06b2dc1779c6f94bc62694511c03a78a1 (diff)
parent37286ade90619bbce3a445dd3dcabe5d8ba21342 (diff)
Merge pull request #913 from reverendhomer/patch-1
Coverity #1299015
Diffstat (limited to 'src')
-rw-r--r--src/libsystemd/sd-bus/bus-message.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c
index 006e4a2b58..94427ed664 100644
--- a/src/libsystemd/sd-bus/bus-message.c
+++ b/src/libsystemd/sd-bus/bus-message.c
@@ -608,8 +608,8 @@ static sd_bus_message *message_new(sd_bus *bus, uint8_t type) {
m->header = (struct bus_header*) ((uint8_t*) m + ALIGN(sizeof(struct sd_bus_message)));
m->header->endian = BUS_NATIVE_ENDIAN;
m->header->type = type;
- m->header->version = bus ? bus->message_version : 1;
- m->allow_fds = !bus || bus->can_fds || (bus->state != BUS_HELLO && bus->state != BUS_RUNNING);
+ m->header->version = bus->message_version;
+ m->allow_fds = bus->can_fds || (bus->state != BUS_HELLO && bus->state != BUS_RUNNING);
m->root_container.need_offsets = BUS_MESSAGE_IS_GVARIANT(m);
m->bus = sd_bus_ref(bus);