summaryrefslogtreecommitdiff
path: root/src/timezone/localtime.c
diff options
context:
space:
mode:
authorPeter Geoghegan2022-09-19 22:13:42 +0000
committerPeter Geoghegan2022-09-19 22:13:42 +0000
commitc4f8e89fef3d4cd8b0791637667fd984d6f38fb2 (patch)
tree4f64968ab17baef3aa658c963d2a215598ee3eb1 /src/timezone/localtime.c
parentbc2187ed63c56bb9cd99f6613f3e2ba56afb22fe (diff)
Consistently use named parameters in timezone code.
Make our copy of the IANA timezone library use named parameters in function declarations. Also make sure that parameter names from each function's declaration match corresponding definition parameter names. This makes the timezone code follow Postgres coding standards. The value of having a consistent standard everywhere seems to outweigh the cost of keeping the function declarations in sync with future IANA releases. Author: Peter Geoghegan <pg@bowt.ie> Reviewed-By: David Rowley <dgrowleyml@gmail.com> Discussion: https://postgr.es/m/CAH2-WznJt9CMM9KJTMjJh_zbL5hD9oX44qdJ4aqZtjFi-zA3Tg@mail.gmail.com
Diffstat (limited to 'src/timezone/localtime.c')
-rw-r--r--src/timezone/localtime.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/timezone/localtime.c b/src/timezone/localtime.c
index fa3c059038c..ad83c7ee5e0 100644
--- a/src/timezone/localtime.c
+++ b/src/timezone/localtime.c
@@ -82,13 +82,15 @@ struct rule
* Prototypes for static functions.
*/
-static struct pg_tm *gmtsub(pg_time_t const *, int32, struct pg_tm *);
-static bool increment_overflow(int *, int);
-static bool increment_overflow_time(pg_time_t *, int32);
-static int64 leapcorr(struct state const *, pg_time_t);
-static struct pg_tm *timesub(pg_time_t const *, int32, struct state const *,
- struct pg_tm *);
-static bool typesequiv(struct state const *, int, int);
+static struct pg_tm *gmtsub(pg_time_t const *timep, int32 offset,
+ struct pg_tm *tmp);
+static bool increment_overflow(int *ip, int j);
+static bool increment_overflow_time(pg_time_t *tp, int32 j);
+static int64 leapcorr(struct state const *sp, pg_time_t t);
+static struct pg_tm *timesub(pg_time_t const *timep,
+ int32 offset, struct state const *sp,
+ struct pg_tm *tmp);
+static bool typesequiv(struct state const *sp, int a, int b);
/*