From 2f1d61552d429c4e1cbcec115f3cc3dcaf91400d Mon Sep 17 00:00:00 2001 From: TAMUKI Shoichi Date: Tue, 2 Apr 2019 16:37:03 +0900 Subject: time/tst-strftime2.c: Make the file easier to maintain Express the years as full Gregorian years (e.g., 1988 instead of 88) and months with natural numbers (1-12 rather than 0-11). Compare actual dates rather than indexes when selecting the era name. Declare the local variable era as a string character pointer rather than an array of chars where the actual string is copied which might lead to potential buffer overflows in future. Co-authored-by: Rafal Luzynski Reviewed-by: Carlos O'Donell ChangeLog: * time/tst-strftime2.c (date_t): Explicitly define the type. (dates): Use natural month and year numbers to express a date. (is_before): New function to compare dates. (mkreftable): Minor improvements to simplify maintenance. (do_test): Reflect the changes in dates array. --- ChangeLog | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 50a00bb40f..55e501e32e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2019-04-02 TAMUKI Shoichi + Rafal Luzynski + + * time/tst-strftime2.c (date_t): Explicitly define the type. + (dates): Use natural month and year numbers to express a date. + (is_before): New function to compare dates. + (mkreftable): Minor improvements to simplify maintenance. + (do_test): Reflect the changes in dates array. + 2019-04-01 Carlos O'Donell * localedata/locales/ja_JP: Add comments to era entries. -- cgit v1.2.3