diff options
author | reverendhomer <mk.43.ecko@gmail.com> | 2015-08-08 09:49:39 +0300 |
---|---|---|
committer | reverendhomer <mk.43.ecko@gmail.com> | 2015-08-08 09:49:39 +0300 |
commit | 37286ade90619bbce3a445dd3dcabe5d8ba21342 (patch) | |
tree | c4b188defbf7aa93a86c98405031ba0cfe5067d1 /src/libsystemd | |
parent | 9db81db06b2dc1779c6f94bc62694511c03a78a1 (diff) |
Coverity #1299015
bus can never be NULL due to assert
Diffstat (limited to 'src/libsystemd')
-rw-r--r-- | src/libsystemd/sd-bus/bus-message.c | 4 |
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); |