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/args.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/args.c')
-rw-r--r-- | src/args.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -561,8 +561,9 @@ int parse_args(int argc, char **argv) usage_try(); return EXIT_FAILURE; } - } else + } else { tnum = -1; + } break; case 'v': vflag = 1; @@ -572,11 +573,11 @@ int parse_args(int argc, char **argv) multiple_flag++; load_data++; if (optarg != NULL) { - if (strcmp(optarg, "ical") == 0) + if (strcmp(optarg, "ical") == 0) { xfmt = IO_EXPORT_ICAL; - else if (strcmp(optarg, "pcal") == 0) + } else if (strcmp(optarg, "pcal") == 0) { xfmt = IO_EXPORT_PCAL; - else { + } else { fputs(_("Argument for '-x' should be either " "'ical' or 'pcal'\n"), stderr); usage(); |