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/calcurse.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/calcurse.c') 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); + } } /* -- cgit v1.2.3-54-g00ecf