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:
committed by
Luca Boccassi
parent
b2bd488e76
commit
fed25720ef
+3
-6
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user