1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-29 13:25:43 +03:00

calendarspec: rename "eom" to "end_of_month"

This commit is contained in:
Douglas Christman 2016-11-24 17:47:25 -05:00
parent 9904dc00e7
commit c58b1b3abf

View File

@ -153,7 +153,7 @@ int calendar_spec_normalize(CalendarSpec *c) {
return 0; return 0;
} }
_pure_ static bool chain_valid(CalendarComponent *c, int from, int to, bool eom) { _pure_ static bool chain_valid(CalendarComponent *c, int from, int to, bool end_of_month) {
if (!c) if (!c)
return true; return true;
@ -163,17 +163,17 @@ _pure_ static bool chain_valid(CalendarComponent *c, int from, int to, bool eom)
/* /*
* c->repeat must be short enough so at least one repetition may * c->repeat must be short enough so at least one repetition may
* occur before the end of the interval. For dates scheduled * occur before the end of the interval. For dates scheduled
* relative to the end of the month (eom), c->value corresponds * relative to the end of the month, c->value corresponds to the
* to the Nth last day of the month. * Nth last day of the month.
*/ */
if (eom && c->value - c->repeat < from) if (end_of_month && c->value - c->repeat < from)
return false; return false;
if (!eom && c->value + c->repeat > to) if (!end_of_month && c->value + c->repeat > to)
return false; return false;
if (c->next) if (c->next)
return chain_valid(c->next, from, to, eom); return chain_valid(c->next, from, to, end_of_month);
return true; return true;
} }