summaryrefslogtreecommitdiff
path: root/src/calcurse.c
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2013-02-17 09:01:46 +0100
committerLukas Fleischer <calcurse@cryptocrack.de>2013-02-17 09:19:04 +0100
commita363cb9b9111aed22d105adb0e7a8e9caab9bbe3 (patch)
treeb0be8fac73932dcde5b40d6f8cee777f501d869c /src/calcurse.c
parent8e16853201f8a608905cacbf1c7e4fb8ac7e568e (diff)
downloadcalcurse-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/calcurse.c')
-rw-r--r--src/calcurse.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/calcurse.c b/src/calcurse.c
index 6fd2ecb..59f912e 100644
--- a/src/calcurse.c
+++ b/src/calcurse.c
@@ -256,8 +256,9 @@ static inline void key_edit_note(void)
if (wins_slctd() == APP && ui_day_hilt() != 0) {
day_edit_note(day_get_item(ui_day_hilt()), conf.editor);
inday = do_storage(0);
- } else if (wins_slctd() == TOD && ui_todo_hilt() != 0)
+ } else if (wins_slctd() == TOD && ui_todo_hilt() != 0) {
todo_edit_note(todo_get_item(ui_todo_hilt()), conf.editor);
+ }
wins_update(FLAG_ALL);
}
@@ -465,14 +466,15 @@ static inline void key_generic_quit(void)
note_gc();
if (conf.confirm_quit) {
- if (status_ask_bool(_("Do you really want to quit ?")) == 1)
+ if (status_ask_bool(_("Do you really want to quit ?")) == 1) {
exit_calcurse(EXIT_SUCCESS);
- else {
+ } else {
wins_erase_status_bar();
wins_update(FLAG_STA);
}
- } else
+ } else {
exit_calcurse(EXIT_SUCCESS);
+ }
}
/*