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 6013442633; Mon, 25 Sep 2023 08:25:52 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 49E4F402CC; Mon, 25 Sep 2023 08:25:52 +0200 (CEST) Received: from dkmailrelay1.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id 35EA5402B7 for ; Mon, 25 Sep 2023 08:25:51 +0200 (CEST) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesys.local [192.168.4.10]) by dkmailrelay1.smartsharesystems.com (Postfix) with ESMTP id 223FB20895; Mon, 25 Sep 2023 08:25:51 +0200 (CEST) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: [PATCH v11 15/16] eal: use standard ternary operator instead of GCC extension Date: Mon, 25 Sep 2023 08:25:48 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35D87C03@smartserver.smartshare.dk> In-Reply-To: <1691781658-32520-16-git-send-email-roretzla@linux.microsoft.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH v11 15/16] eal: use standard ternary operator instead of GCC extension Thread-Index: AdnMiP4Eh4Pw6AyYT9iMRVR/nux5mAi8A3iw References: <1680558751-17931-1-git-send-email-roretzla@linux.microsoft.com> <1691781658-32520-1-git-send-email-roretzla@linux.microsoft.com> <1691781658-32520-16-git-send-email-roretzla@linux.microsoft.com> From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: "Tyler Retzlaff" , Cc: "Bruce Richardson" , "Konstantin Ananyev" , "Ciara Power" , , 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 > From: Tyler Retzlaff [mailto:roretzla@linux.microsoft.com] > Sent: Friday, 11 August 2023 21.21 >=20 > Use standard ternary operator instead of gcc extension. There is > no concern of side-effects for this evaluation so allow the code > to be portable. >=20 > While here update the condition to compare default_log_stream > directly against NULL. >=20 > Signed-off-by: Tyler Retzlaff > --- > lib/eal/common/eal_common_hexdump.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/lib/eal/common/eal_common_hexdump.c > b/lib/eal/common/eal_common_hexdump.c > index 63bbbdc..6fd6e21 100644 > --- a/lib/eal/common/eal_common_hexdump.c > +++ b/lib/eal/common/eal_common_hexdump.c > @@ -15,7 +15,7 @@ > char line[LINE_LEN]; /* space needed 8+16*3+3+16 =3D=3D 75 */ >=20 > fprintf(f, "%s at [%p], len=3D%u\n", > - title ? : " Dump data", data, len); > + title !=3D NULL ? title : " Dump data", data, len); > ofs =3D 0; > while (ofs < len) { > /* format the line in the buffer */ > -- > 1.8.3.1 Reviewed-by: Morten Br=F8rup