l = strlen(name);
size = offsetof(struct kdbus_cmd_name, name) + l + 1;
- n = alloca0(size);
+ n = alloca0_align(size, 8);
n->size = size;
kdbus_translate_request_name_flags(flags, (uint64_t *) &n->flags);
memcpy(n->name, name, l+1);
assert(name);
l = strlen(name);
- n = alloca0(offsetof(struct kdbus_cmd_name, name) + l + 1);
+ n = alloca0_align(offsetof(struct kdbus_cmd_name, name) + l + 1, 8);
n->size = offsetof(struct kdbus_cmd_name, name) + l + 1;
memcpy(n->name, name, l+1);
return r;
if (r > 0) {
size = offsetof(struct kdbus_cmd_conn_info, name);
- cmd = alloca0(size);
+ cmd = alloca0_align(size, 8);
cmd->id = id;
} else {
size = offsetof(struct kdbus_cmd_conn_info, name) + strlen(name) + 1;
- cmd = alloca0(size);
+ cmd = alloca0_align(size, 8);
strcpy(cmd->name, name);
}
offsetof(struct kdbus_notify_name_change, name) +
l);
- m = alloca0(sz);
+ m = alloca0_align(sz, 8);
m->size = sz;
m->cookie = cookie;
offsetof(struct kdbus_item, id_change) +
sizeof(struct kdbus_notify_id_change));
- m = alloca0(sz);
+ m = alloca0_align(sz, 8);
m->size = sz;
m->cookie = cookie;
if (using_bloom)
sz += ALIGN8(offsetof(struct kdbus_item, data64) + bus->bloom_size);
- m = alloca0(sz);
+ m = alloca0_align(sz, 8);
m->size = sz;
m->cookie = cookie;
sz += ALIGN8(offsetof(struct kdbus_item, str) + l + 1);
}
- hello = alloca0(sz);
+ hello = alloca0_align(sz, 8);
hello->size = sz;
hello->conn_flags = b->hello_flags;
hello->attach_flags = b->attach_flags;
}
static void close_kdbus_msg(sd_bus *bus, struct kdbus_msg *k) {
- uint64_t off;
+ uint64_t off _alignas_(8);
struct kdbus_item *d;
assert(bus);
if (fd < 0)
return -errno;
- make = alloca0(ALIGN8(offsetof(struct kdbus_cmd_make, items) +
- offsetof(struct kdbus_item, data64) + sizeof(uint64_t) +
- offsetof(struct kdbus_item, str) +
- DECIMAL_STR_MAX(uid_t) + 1 + strlen(name) + 1));
+ make = alloca0_align(ALIGN8(offsetof(struct kdbus_cmd_make, items) +
+ offsetof(struct kdbus_item, data64) + sizeof(uint64_t) +
+ offsetof(struct kdbus_item, str) +
+ DECIMAL_STR_MAX(uid_t) + 1 + strlen(name) + 1),
+ 8);
make->size = offsetof(struct kdbus_cmd_make, items);
size = ALIGN8(offsetof(struct kdbus_cmd_make, items));
size += ALIGN8(offsetof(struct kdbus_item, str) + strlen(ep_name) + 1);
- make = alloca0(size);
+ make = alloca0_align(size, 8);
make->size = size;
make->flags = KDBUS_MAKE_ACCESS_WORLD;
size += ALIGN8(offsetof(struct kdbus_item, policy_access) + sizeof(struct kdbus_policy_access));
}
- update = alloca0(size);
+ update = alloca0_align(size, 8);
update->size = size;
n = update->items;
ALIGN8(offsetof(struct kdbus_item, str) + strlen(name) + 1) +
policy_cnt * ALIGN8(offsetof(struct kdbus_item, policy_access) + sizeof(struct kdbus_policy_access));
- hello = alloca0(size);
+ hello = alloca0_align(size, 8);
n = hello->items;
strcpy(n->str, name);
if (fd < 0)
return -errno;
- make = alloca0(ALIGN8(offsetof(struct kdbus_cmd_make, items) +
- offsetof(struct kdbus_item, str) +
- strlen(name) + 1));
+ make = alloca0_align(ALIGN8(offsetof(struct kdbus_cmd_make, items) +
+ offsetof(struct kdbus_item, str) +
+ strlen(name) + 1),
+ 8);
n = make->items;
strcpy(n->str, name);