summaryrefslogtreecommitdiff
path: root/src/ui-todo.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/ui-todo.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/ui-todo.c')
-rw-r--r--src/ui-todo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ui-todo.c b/src/ui-todo.c
index d034881..baecff8 100644
--- a/src/ui-todo.c
+++ b/src/ui-todo.c
@@ -227,9 +227,9 @@ display_todo_item(int incolor, char *msg, int prio, int note, int width, int y,
if (incolor == 0)
custom_apply_attr(w, ATTR_HIGHEST);
- if (utf8_strwidth(msg) < width)
+ if (utf8_strwidth(msg) < width) {
mvwprintw(w, y, x, "%s%c %s", priostr, ch_note, msg);
- else {
+ } else {
for (i = 0; msg[i] && width > 0; i++) {
if (!UTF8_ISCONT(msg[i]))
width -= utf8_width(&msg[i]);