From c3421f4465a7a05f7e842355df0ffb852ebd89c9 Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Tue, 18 Feb 2025 15:08:52 +0100 Subject: [PATCH] lib/: Fix indentation and alignment Signed-off-by: Alejandro Colomar --- lib/getdate.c | 21 +++++++++++---------- lib/strtoday.c | 3 ++- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/lib/getdate.c b/lib/getdate.c index 3d08bd4d1..7479875e8 100644 --- a/lib/getdate.c +++ b/lib/getdate.c @@ -30,20 +30,21 @@ static long yyYear; static int parse_date(const char *s); -time_t get_date (const char *p, const time_t *now) +time_t +get_date(const char *p, const time_t *now) { - struct tm tm; + struct tm tm; - if (parse_date(p) == -1) - return -1; + if (parse_date(p) == -1) + return -1; - tm.tm_year = yyYear - TM_YEAR_ORIGIN; - tm.tm_mon = yyMonth - 1; - tm.tm_mday = yyDay; - tm.tm_hour = tm.tm_min = tm.tm_sec = 0; - tm.tm_isdst = 0; + tm.tm_year = yyYear - TM_YEAR_ORIGIN; + tm.tm_mon = yyMonth - 1; + tm.tm_mday = yyDay; + tm.tm_hour = tm.tm_min = tm.tm_sec = 0; + tm.tm_isdst = 0; - return timegm(&tm); + return timegm(&tm); } diff --git a/lib/strtoday.c b/lib/strtoday.c index c37c90abe..3d9410181 100644 --- a/lib/strtoday.c +++ b/lib/strtoday.c @@ -21,7 +21,8 @@ // string parse-to day-since-Epoch -long strtoday (const char *str) +long +strtoday(const char *str) { time_t t; const char *s = str; -- 2.47.2