From patchwork Fri Feb 8 02:01:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: TAMUKI Shoichi X-Patchwork-Id: 1038425 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-99861-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linet.gr.jp Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="vgh2wE1I"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43wdjP6PDjz9sML for ; Fri, 8 Feb 2019 13:02:16 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:to:subject:from:mime-version :content-type; q=dns; s=default; b=lp804sIyQwe2hAZRDdvUPUXPuqfEu /4f7z2rqV77cpvfQjzJc5fM75aGwgt7YdSBke1sJdnQK4Z0BZwLLQOUXoBa4N7Pi f/oiVteQ8nXt/guPJQTyyrHExSbXoYUyfDbaV/1LHANF4KqUtGncD0j92SfsLtPH HroMAijmvRFjq0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:to:subject:from:mime-version :content-type; s=default; bh=viIaI9SGZlqfCZSmm4+/5geAQ3Q=; b=vgh 2wE1I8oXHe6aVw4OOyPWROV/l/YajRm2RK1k9gLuHMUTM3hra30tPU6rS0L1xqu5 t7BdJrHZ2AdtBWVWUEQRo52lM0i/KKAi/UeGuk+umUUBPr6G4hsrZ9cyQD2B8zE/ FVL7IBdtK7ruIYAISu9hQFuzkJXHW+XCre42n76s= Received: (qmail 89596 invoked by alias); 8 Feb 2019 02:02:10 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 89587 invoked by uid 89); 8 Feb 2019 02:02:09 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy=H*Ad:D*jp X-HELO: mail.linet.jp Message-Id: <201902080201.AA04236@tamuki.linet.gr.jp> Date: Fri, 08 Feb 2019 11:01:39 +0900 To: libc-alpha@sourceware.org Subject: [PATCH v3] tst-strftime2: Use array_length macros instead of magic numbers From: TAMUKI Shoichi MIME-Version: 1.0 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(-) 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)