From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 70049428C5; Mon, 3 Apr 2023 20:59:34 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F3D2840A7E; Mon, 3 Apr 2023 20:59:33 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id F310F400D6 for ; Mon, 3 Apr 2023 20:59:31 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1086) id 2E563210CB3F; Mon, 3 Apr 2023 11:59:31 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 2E563210CB3F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1680548371; bh=D/UXsPXNKhY6Xjoz6IUvU38MkdO90Vrok+jp//MsuYw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ddRPoy3X9ryXq0byUrdmVevZOAoCeoZf1ua+hn1EVSI1aqfhw5qwS+nUgzvbNoeGS 6BcoXw476wkkJlLeVttxBl43BNLCrib5V22dqhWQzdCfjsWiCmMFfQbHlJ9xGEfEMv iHO8SxEiOMnLMLcz8LjyuP48NU1FfdkfbuyKuGiU= From: Tyler Retzlaff To: dev@dpdk.org Cc: ciara.power@intel.com, bruce.richardson@intel.com, david.marchand@redhat.com, thomas@monjalon.net, Tyler Retzlaff Subject: [PATCH v3] improve code portability Date: Mon, 3 Apr 2023 11:59:24 -0700 Message-Id: <1680548365-16525-1-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1680539424-20255-1-git-send-email-roretzla@linux.microsoft.com> References: <1680539424-20255-1-git-send-email-roretzla@linux.microsoft.com> X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Improve portability of telemetry code to allow it to be compiled by msvc unconditionally. Remove use of ranged based initializer (a gcc extension). Instead initialize using for loops over [0..9] [A..Z] [a..z] [_/] on first call. v3: * Move int index declaration to top of function * Fix typo 'Z' -> 'z' in last for loop v2: * Initialize valid character array using for loop instead of explicit initialization of each element. * Drop patch removing VLAs, in a separate series a conditionally compiled change will be introduced. Tyler Retzlaff (1): telemetry: use portable syntax to initialize array lib/telemetry/telemetry_data.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) -- 1.8.3.1