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:
parent
611a6d15cb
commit
d53017292e
@ -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;
|
||||
|
@ -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);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user