[v3] tst-strftime2: Use array_length macros instead of magic numbers

Message ID 201902080201.AA04236@tamuki.linet.gr.jp
State New
Headers show
Series
  • [v3] tst-strftime2: Use array_length macros instead of magic numbers
Related show

Commit Message

TAMUKI Shoichi Feb. 8, 2019, 2:01 a.m.
ChangeLog:

	* time/tst-strftime2.c: Use array_length macros instead of magic
	numbers.
---
 Remarks:
 Compared with v2, I just brushed up the commit message a little.
 Since include/array_length.h has been pushed to master, if there is
 no problem, I will push this change to master in about 12 hours
 later.

 time/tst-strftime2.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch

diff --git a/time/tst-strftime2.c b/time/tst-strftime2.c
index 57d2144..3dca2a9 100644
--- a/time/tst-strftime2.c
+++ b/time/tst-strftime2.c
@@ -41,7 +41,8 @@  static const struct
     { 1, 3, 98 }
   };
 
-static char ref[3][3][6][100];
+static char ref[array_length (locales)][array_length (formats)]
+	       [array_length (dates)][100];
 
 static void
 mkreftable (void)