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 4835D423F2; Mon, 16 Jan 2023 18:52:01 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 566E742D30; Mon, 16 Jan 2023 18:51:37 +0100 (CET) Received: from mail-pj1-f44.google.com (mail-pj1-f44.google.com [209.85.216.44]) by mails.dpdk.org (Postfix) with ESMTP id 1CDE042D28 for ; Mon, 16 Jan 2023 18:51:36 +0100 (CET) Received: by mail-pj1-f44.google.com with SMTP id q23-20020a17090a065700b002290913a521so12342934pje.5 for ; Mon, 16 Jan 2023 09:51:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=YATe7tAw+KMw2zlItbvno1Lny+6bGjYqH5/deKt3jw8=; b=fn4FPBvP4326s5q9zyEiWrOmayFImWs125/zbGUtTrD+z4OP5khO+ROEDGem4/ZyVr XWHfnT3QsZrtjLt2D10l1hoIikp2YjH5IBw0xiiQbtVOFpK21Q3K4Cgpa5+zzdL/ExFQ EwZ2awp41IjZZMjS2HC8pK0Q9fAvv+HE0YyVbXdFKqszpHRF9FSzj/aRvgvIb03hdmDI RWnShYCihddmIKPUWKgv+p2g3yjteWzZF0bWpbAQYrPOFk5D/mxOnMMTu3AmIYSSTrMw DdwCQ+3JhYu+S7YLrh65XvGvAz4T6TjCcNRyOLllKtL/xL+N+t+rifpRxJKzpA52qgxB chZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YATe7tAw+KMw2zlItbvno1Lny+6bGjYqH5/deKt3jw8=; b=QRFEVTiFcPB3n9qcsyWPikYKk2N8sj0KP62dcE41JTiHNxJaNTIS4BXKKY3EoC0n5Z n9lRro4q3qhCcc7PrFGcDlrmCqe0quB0YEue97mIE4k8qb0kdHvykZv5DhGpJ+akbfSg lUnCVyButgTJAqvGre3HhPpui23g2RGCQmnj0mHDOLWUKcmmxIlkkyOb+QLxUUYgPLUV mKLrDj4eBPOLddb5uVxDolfab+4Szt3jefW4Wn+voboFkU16lq3TSfb757b95929O9df jcM/yHSWrjhbRPBaXWXriI18OzYUP/7vQbeIFOB3/lPZ2tT1gVXIaT/idY85IQaFdHU3 NE2Q== X-Gm-Message-State: AFqh2krfbdai5KYLPW2aPQy3urp5NcGKQXGMnfrPfZjUdlSShRlM0uS3 AiW1xcjsaKqE+MTXoaES2aS4emJ92m1fAan8uOI= X-Google-Smtp-Source: AMrXdXvjyhVja56yVd9YHKOru/o3YkRYJFH0RV+JYma5MjQVQBXUdqKYfHXALuA/XkUzOLUEVFQaCg== X-Received: by 2002:a17:902:cf10:b0:194:5fc9:f55a with SMTP id i16-20020a170902cf1000b001945fc9f55amr673299plg.35.1673891495114; Mon, 16 Jan 2023 09:51:35 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id k15-20020a170902d58f00b001947c22185bsm5035795plh.184.2023.01.16.09.51.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Jan 2023 09:51:34 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Konstantin Ananyev , David Hunt , Anatoly Burakov Subject: [PATCH v2 5/7] examples: fix whitespace Date: Mon, 16 Jan 2023 09:51:25 -0800 Message-Id: <20230116175127.87346-6-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230116175127.87346-1-stephen@networkplumber.org> References: <20230116172732.84976-1-stephen@networkplumber.org> <20230116175127.87346-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 The style standard is to use blank after keywords. I.e "if (" not "if(" Signed-off-by: Stephen Hemminger --- examples/ip_reassembly/main.c | 2 +- examples/l3fwd-power/main.c | 7 ++++--- examples/l3fwd/main.c | 7 ++++--- examples/multi_process/symmetric_mp/main.c | 4 ++-- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/examples/ip_reassembly/main.c b/examples/ip_reassembly/main.c index bd0b1d31decf..7e84b4944759 100644 --- a/examples/ip_reassembly/main.c +++ b/examples/ip_reassembly/main.c @@ -300,7 +300,7 @@ send_single_packet(struct rte_mbuf *m, uint16_t port) TX_LCORE_STAT_UPDATE(&qconf->tx_stat, queue, 1); txmb->m_table[txmb->head] = m; - if(++txmb->head == len) + if (++txmb->head == len) txmb->head = 0; return 0; diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c index fd3ade330f82..d10102fa282e 100644 --- a/examples/l3fwd-power/main.c +++ b/examples/l3fwd-power/main.c @@ -1785,13 +1785,14 @@ parse_config(const char *q_arg) nb_lcore_params = 0; - while ((p = strchr(p0,'(')) != NULL) { + while ((p = strchr(p0, '(')) != NULL) { ++p; - if((p0 = strchr(p,')')) == NULL) + p0 = strchr(p, ')'); + if (p0 == NULL) return -1; size = p0 - p; - if(size >= sizeof(s)) + if (size >= sizeof(s)) return -1; snprintf(s, sizeof(s), "%.*s", size, p); diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c index 5198ff30dd00..e2bdfe451a2c 100644 --- a/examples/l3fwd/main.c +++ b/examples/l3fwd/main.c @@ -514,13 +514,14 @@ parse_config(const char *q_arg) nb_lcore_params = 0; - while ((p = strchr(p0,'(')) != NULL) { + while ((p = strchr(p0, '(')) != NULL) { ++p; - if((p0 = strchr(p,')')) == NULL) + p0 = strchr(p, ')'); + if (p0 == NULL) return -1; size = p0 - p; - if(size >= sizeof(s)) + if (size >= sizeof(s)) return -1; snprintf(s, sizeof(s), "%.*s", size, p); diff --git a/examples/multi_process/symmetric_mp/main.c b/examples/multi_process/symmetric_mp/main.c index 1ff85875dfdf..8d1119bd8483 100644 --- a/examples/multi_process/symmetric_mp/main.c +++ b/examples/multi_process/symmetric_mp/main.c @@ -156,7 +156,7 @@ smp_parse_args(int argc, char **argv) /* get the port numbers from the port mask */ RTE_ETH_FOREACH_DEV(i) - if(port_mask & (1 << i)) + if (port_mask & (1 << i)) ports[num_ports++] = (uint8_t)i; ret = optind-1; @@ -471,7 +471,7 @@ main(int argc, char **argv) if (num_ports & 1) rte_exit(EXIT_FAILURE, "Application must use an even number of ports\n"); for(i = 0; i < num_ports; i++){ - if(proc_type == RTE_PROC_PRIMARY) + if (proc_type == RTE_PROC_PRIMARY) if (smp_port_init(ports[i], mp, (uint16_t)num_procs) < 0) rte_exit(EXIT_FAILURE, "Error initialising ports\n"); } -- 2.39.0