From a363cb9b9111aed22d105adb0e7a8e9caab9bbe3 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Sun, 17 Feb 2013 09:01:46 +0100 Subject: Fix braces in if-else statements From the Linux kernel coding guidelines: Do not unnecessarily use braces where a single statement will do. [...] This does not apply if one branch of a conditional statement is a single statement. Use braces in both branches. Signed-off-by: Lukas Fleischer --- src/recur.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/recur.c') diff --git a/src/recur.c b/src/recur.c index e9312e7..6a3a902 100644 --- a/src/recur.c +++ b/src/recur.c @@ -203,8 +203,9 @@ struct recur_apoint *recur_apoint_new(char *mesg, char *note, long start, if (except) { exc_dup(&rapt->exc, except); free_exc_list(except); - } else + } else { LLIST_INIT(&rapt->exc); + } LLIST_TS_LOCK(&recur_alist_p); LLIST_TS_ADD_SORTED(&recur_alist_p, rapt, recur_apoint_cmp_start); @@ -231,8 +232,9 @@ struct recur_event *recur_event_new(char *mesg, char *note, long day, int id, if (except) { exc_dup(&rev->exc, except); free_exc_list(except); - } else + } else { LLIST_INIT(&rev->exc); + } LLIST_ADD_SORTED(&recur_elist, rev, recur_event_cmp_day); @@ -627,8 +629,9 @@ recur_item_find_occurrence(long item_start, long item_dur, llist_t * item_exc, } return 1; - } else + } else { return 0; + } } unsigned -- cgit v1.2.3-54-g00ecf