summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2023-05-07 12:56:46 +0200
committerHiltjo Posthuma <hiltjo@codemadness.org>2023-05-07 13:29:56 +0200
commitccee88cb02cb54f586d22c53e8bb8865817c3dc4 (patch)
treea0458d58b40b69eadc939bb09cac2d014d6d8107
parent6e4136753bd0faa15c198118b05c529d96d908c5 (diff)
sfeed: datetounix: code-style, change , to separate lines (-Wcomma)
-rw-r--r--sfeed.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/sfeed.c b/sfeed.c
index af4534c..e7ffa05 100644
--- a/sfeed.c
+++ b/sfeed.c
@@ -470,12 +470,16 @@ datetounix(long long year, int mon, int day, int hour, int min, int sec)
if (!rem) {
is_leap = 1;
} else {
- if (rem >= 300)
- centuries = 3, rem -= 300;
- else if (rem >= 200)
- centuries = 2, rem -= 200;
- else if (rem >= 100)
- centuries = 1, rem -= 100;
+ if (rem >= 300) {
+ centuries = 3;
+ rem -= 300;
+ } else if (rem >= 200) {
+ centuries = 2;
+ rem -= 200;
+ } else if (rem >= 100) {
+ centuries = 1;
+ rem -= 100;
+ }
if (rem) {
leaps = rem / 4U;
rem %= 4U;