This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH v2] tst-strftime2: Declare an array for reference using array_length


Declare an array for reference using array_length macros instead of
magic numbers.

ChangeLog:

	* time/tst-strftime2.c: Declare an array for reference using
	array_length macros instead of magic numbers.
---
 time/tst-strftime2.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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)
-- 
2.2.1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]