--- src/shared/calendarspec.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/src/shared/calendarspec.c b/src/shared/calendarspec.c index 6186301..fae7dfd 100644 --- a/src/shared/calendarspec.c +++ b/src/shared/calendarspec.c @@ -857,10 +857,10 @@ int calendar_spec_from_string(const char *p, CalendarSpec **spec) { if (r < 0) goto fail; - } else if (strcaseeq(p, "monthly")) { - r = const_chain(1, &c->day); - if (r < 0) - goto fail; + } else if (strcaseeq(p, "weekly")) { + + c->weekdays_bits = 1; + r = const_chain(0, &c->hour); if (r < 0) goto fail; @@ -871,11 +871,7 @@ int calendar_spec_from_string(const char *p, CalendarSpec **spec) { if (r < 0) goto fail; - } else if (strcaseeq(p, "annually") || strcaseeq(p, "yearly") - || strcaseeq(p, "anually") /* backwards compatibility */ ) { - r = const_chain(1, &c->month); - if (r < 0) - goto fail; + } else if (strcaseeq(p, "monthly")) { r = const_chain(1, &c->day); if (r < 0) goto fail; @@ -889,10 +885,14 @@ int calendar_spec_from_string(const char *p, CalendarSpec **spec) { if (r < 0) goto fail; - } else if (strcaseeq(p, "weekly")) { - - c->weekdays_bits = 1; - + } else if (strcaseeq(p, "annually") || strcaseeq(p, "yearly") + || strcaseeq(p, "anually") /* backwards compatibility */ ) { + r = const_chain(1, &c->month); + if (r < 0) + goto fail; + r = const_chain(1, &c->day); + if (r < 0) + goto fail; r = const_chain(0, &c->hour); if (r < 0) goto fail; -- 1.9.3 _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel