diff options
author | Lukas Fleischer <calcurse@cryptocrack.de> | 2013-02-17 09:01:46 +0100 |
---|---|---|
committer | Lukas Fleischer <calcurse@cryptocrack.de> | 2013-02-17 09:19:04 +0100 |
commit | a363cb9b9111aed22d105adb0e7a8e9caab9bbe3 (patch) | |
tree | b0be8fac73932dcde5b40d6f8cee777f501d869c /src/recur.c | |
parent | 8e16853201f8a608905cacbf1c7e4fb8ac7e568e (diff) | |
download | calcurse-a363cb9b9111aed22d105adb0e7a8e9caab9bbe3.zip |
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 <calcurse@cryptocrack.de>
Diffstat (limited to 'src/recur.c')
-rw-r--r-- | src/recur.c | 9 |
1 files changed, 6 insertions, 3 deletions
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 |