timesyncd: reorder structs instead of useless bitfields

Because of alignment, those bitfields were not doing anything useful,
and were causing the generated code to be more complicated. But in this
case, at least potentially there might be a number of copies of those
structs (if we have a bunch of time servers configured), so let's actually
implement the intended space savings by reording the fields to reduce the
size of holes.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2024-02-20 10:41:09 +01:00
parent 611a6d15cb
commit d53017292e
2 changed files with 3 additions and 4 deletions
+1 -2
View File
@@ -45,10 +45,9 @@ struct Manager {
LIST_HEAD(ServerName, runtime_servers);
LIST_HEAD(ServerName, fallback_servers);
bool have_fallbacks:1;
RateLimit ratelimit;
bool exhausted_servers;
bool have_fallbacks;
/* network */
sd_event_source *network_event_source;
+2 -2
View File
@@ -30,11 +30,11 @@ struct ServerAddress {
struct ServerName {
Manager *manager;
bool marked;
ServerType type;
char *string;
bool marked:1;
LIST_HEAD(ServerAddress, addresses);
LIST_FIELDS(ServerName, names);
};