core: use uniform style for RateLimit initialization

RateLimit is designed so that we can always initialize only the first two
fields explicitly. All other call sites use a single line for this.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2023-11-22 12:32:31 +00:00
committed by Luca Boccassi
parent b2bd488e76
commit fed25720ef
5 changed files with 8 additions and 14 deletions
+3 -6
View File
@@ -132,15 +132,12 @@ Unit* unit_new(Manager *m, size_t size) {
u->last_section_private = -1;
u->start_ratelimit = (RateLimit) {
u->start_ratelimit = (const RateLimit) {
m->defaults.start_limit_interval,
m->defaults.start_limit_burst
m->defaults.start_limit_burst,
};
u->auto_start_stop_ratelimit = (const RateLimit) {
10 * USEC_PER_SEC,
16
};
u->auto_start_stop_ratelimit = (const RateLimit) { .interval = 10 * USEC_PER_SEC, .burst = 16 };
return u;
}