sd-bus: drop redundant condition

By the previous commit, ALIGN8() is always equal to or greater than the
argument.
This commit is contained in:
Yu Watanabe
2022-05-27 11:23:46 +09:00
parent dc7be33266
commit 30da99bd30

View File

@@ -507,8 +507,7 @@ int bus_message_from_header(
m->body_size = BUS_MESSAGE_BSWAP32(m, h->dbus1.body_size);
assert(message_size >= sizeof(struct bus_header));
if (m->fields_size > message_size - sizeof(struct bus_header) ||
ALIGN8(m->fields_size) > message_size - sizeof(struct bus_header) ||
if (ALIGN8(m->fields_size) > message_size - sizeof(struct bus_header) ||
m->body_size != message_size - sizeof(struct bus_header) - ALIGN8(m->fields_size))
return -EBADMSG;
}