bus/bus: fix static_assert() mixed in code
Gcc keeps warning about misplaced static_assert()s. Lets make em happy
and keep them with the declarations.
@@ -27,6 +27,9 @@ int bus_init(Bus *bus,
void *random;
int r;
+ static_assert(_USER_SLOT_N == C_ARRAY_SIZE(maxima),
+ "User accounting slot mismatch");
+
if (strlen(machine_id) + 1 != sizeof(bus->machine_id))
return error_origin(-EINVAL);
@@ -39,9 +42,6 @@ int bus_init(Bus *bus,
c_assert(random);
memcpy(bus->guid, random, sizeof(bus->guid));
- static_assert(_USER_SLOT_N == C_ARRAY_SIZE(maxima),
- "User accounting slot mismatch");
-
r = user_registry_init(&bus->users, log, _USER_SLOT_N, maxima);
if (r)
return error_fold(r);
