talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 5fcfe9a0862961728a9450fd36d2eb99c32b217b
parent e48b73905257071c561d1ae4dc4d1f040ee1fbd1
Author: Andrej Kacian <ticho@claws-mail.org>
Date:   Tue,  9 Aug 2016 23:38:32 +0200

Fix a potential bug in vcalendar's libical.

Some compilers seem to understand this construction as an empty
for() cycle, followed by an unrelated block enclosed in braces.
We make sure the compiler does what we want by putting the
opening brace at the same line as for().

Diffstat:
Msrc/plugins/vcalendar/libical/libical/icalrecur.c | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/plugins/vcalendar/libical/libical/icalrecur.c b/src/plugins/vcalendar/libical/libical/icalrecur.c @@ -1743,8 +1743,7 @@ int expand_year_days(struct icalrecur_iterator_impl* impl,short year) /* FREQ=YEARLY; BYMONTHDAY=1,15; BYMONTH=10 */ for(j=0;impl->by_ptrs[BY_MONTH][j]!=ICAL_RECURRENCE_ARRAY_MAX;j++){ - for(k=0;impl->by_ptrs[BY_MONTH_DAY][k]!=ICAL_RECURRENCE_ARRAY_MAX;k++) - { + for(k=0;impl->by_ptrs[BY_MONTH_DAY][k]!=ICAL_RECURRENCE_ARRAY_MAX;k++){ short month = impl->by_ptrs[BY_MONTH][j]; short month_day = impl->by_ptrs[BY_MONTH_DAY][k]; short doy;