1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-23 21:35:11 +03:00

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-19 12:20:20 +01:00
parent 611a6d15cb
commit d53017292e
2 changed files with 3 additions and 4 deletions

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;

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);
};