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 E7359423F4; Tue, 17 Jan 2023 01:15:37 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 86FBB42D30; Tue, 17 Jan 2023 01:15:04 +0100 (CET) Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) by mails.dpdk.org (Postfix) with ESMTP id BEA7142D2D for ; Tue, 17 Jan 2023 01:15:02 +0100 (CET) Received: by mail-pl1-f177.google.com with SMTP id 20so4534121plo.3 for ; Mon, 16 Jan 2023 16:15:02 -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=+63KCUlSVUQII/ZmM5pn2qrZQmqVkSXGfdZlVK9RHmQ=; b=3YNd+jRcIEOfRwNYV5G0UrT+zLHuKx825BQ4H7euz2FxcTxVypWN1ktdMxaTEsMaG8 fIwme0GRmEdNNucJO6tey55BynfCw1Uu3BHwdrctt3asB7A2lDXK3rjYCUPM6Tx1niUZ HB9htNrKu5OksXgjOqq+o2xaWQzULpREzNpoMW2LsTPEo6/TfAmPjt7yg8Tohdi7U4ID 7gHH0LBojuD86sSDsCuooFPVXLzrglLDTDGzLgUFfB7AZjvxAGjp8RrmfqiIiWXLYluL 6ClG5mWgP3kqTeGfZdR2xknYewxo3HSDEDq1xVnVPExL12o+0557pFaKegJbjIvQ73Y5 CIIQ== 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=+63KCUlSVUQII/ZmM5pn2qrZQmqVkSXGfdZlVK9RHmQ=; b=3bEPKWlXeZimivP9II6arZxy3yZ0zLtaK41Pxv65IZbh2SkM/QGW0u6PCB5XSQruWl iYAjnEeRA1UDi4ALR5qUou7mVjUg42FQSTWtPBxet9g9RhfOltnSouGdH2NZ/r82tU0I g1945mCznMaHJC8o9ApDck61QiIyP10aq4Du4BgAUZ2dwxs6V+CSinOQpMlfn802n73s kQWqVLeNu8HF4nNkRY4jVdWkhXJZZIdzEvfycGBesxQ1QeGEFMDWmkQVNkXVBFz8zODC g7uqh/vfrFsdQZwLt6Z1AT9HugH8ssscYNSgYs+mecWis9r3Wzs2OBYCS/HqKhdk8BW9 zZzQ== X-Gm-Message-State: AFqh2kr2aDxDS5mDf++PsjlWk1pRpXxPAgekesboYqpsMJY6lHzi4EcF ir+mQE1EIInJzWAQeQlwLu01zOgNuu4CqDdWe0I= X-Google-Smtp-Source: AMrXdXsfHQN3STYUAXwmEcrvDZQ0D0uf73aYF19n6LuKNfmdX/9Pt6yzWHRxTUK7CLTez7Iv4fbGgQ== X-Received: by 2002:a05:6a20:a802:b0:b8:b02d:9415 with SMTP id cb2-20020a056a20a80200b000b8b02d9415mr645551pzb.12.1673914501631; Mon, 16 Jan 2023 16:15:01 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id z24-20020a630a58000000b004790eb3fee1sm15940614pgk.90.2023.01.16.16.15.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Jan 2023 16:15:01 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Olivier Matz Subject: [PATCH v3 6/7] cmdline: fix whitespace Date: Mon, 16 Jan 2023 16:14:52 -0800 Message-Id: <20230117001453.94082-7-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230117001453.94082-1-stephen@networkplumber.org> References: <20230116172732.84976-1-stephen@networkplumber.org> <20230117001453.94082-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 --- lib/cmdline/cmdline_rdline.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/cmdline/cmdline_rdline.c b/lib/cmdline/cmdline_rdline.c index 5cf723a0126a..1ceba6b0b8d4 100644 --- a/lib/cmdline/cmdline_rdline.c +++ b/lib/cmdline/cmdline_rdline.c @@ -301,7 +301,7 @@ rdline_char_in(struct rdline *rdl, char c) /* delete 1 char from the left */ case CMDLINE_KEY_BKSPACE: case CMDLINE_KEY_BKSPACE2: - if(!cirbuf_del_tail_safe(&rdl->left)) { + if (!cirbuf_del_tail_safe(&rdl->left)) { rdline_puts(rdl, vt100_bs); display_right_buffer(rdl, 1); } @@ -354,7 +354,7 @@ rdline_char_in(struct rdline *rdl, char c) /* paste contents of kill buffer to the left side of caret */ case CMDLINE_KEY_CTRL_Y: i=0; - while(CIRBUF_GET_LEN(&rdl->right) + CIRBUF_GET_LEN(&rdl->left) < + while (CIRBUF_GET_LEN(&rdl->right) + CIRBUF_GET_LEN(&rdl->left) < RDLINE_BUF_SIZE && i < rdl->kill_size) { cirbuf_add_tail(&rdl->left, rdl->kill_buf[i]); @@ -403,10 +403,10 @@ rdline_char_in(struct rdline *rdl, char c) tmp_size = strnlen(tmp_buf, sizeof(tmp_buf)); /* add chars */ if (ret == RDLINE_RES_COMPLETE) { - i=0; - while(CIRBUF_GET_LEN(&rdl->right) + CIRBUF_GET_LEN(&rdl->left) < - RDLINE_BUF_SIZE && - i < tmp_size) { + i = 0; + while (CIRBUF_GET_LEN(&rdl->right) + + CIRBUF_GET_LEN(&rdl->left) < RDLINE_BUF_SIZE && + i < tmp_size) { cirbuf_add_tail(&rdl->left, tmp_buf[i]); rdl->write_char(rdl, tmp_buf[i]); i++; -- 2.39.0