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 2DA1B423F2; Mon, 16 Jan 2023 18:52:07 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 30D0140A7D; Mon, 16 Jan 2023 18:51:40 +0100 (CET) Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) by mails.dpdk.org (Postfix) with ESMTP id 12AA842D2C for ; Mon, 16 Jan 2023 18:51:37 +0100 (CET) Received: by mail-pl1-f178.google.com with SMTP id c6so31047465pls.4 for ; Mon, 16 Jan 2023 09:51:37 -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=GcXZRPeVVdJzYIGq92i4N3wlcBi886KDG86ytaWaUc2ahtMHBu/CFY03Epm9w+dyUY X4pxNaIJ48N7jinqfiyiu/kmzOCjS/auu1d9ITYpOwnQ6v8tflZsFTvLbtTGAkqrJLk9 CzeBLJ5AZLXhAx/ljBRxpgQKxqemMSiG+WfJMZxtaLQPlQHngwU7qyQ3QdPdzWWBnoIi /6S5fKQ6wmz6Zj38Qn4rDLYR8GT1PuM8KM0ZEDVG/qXTXKrip9USK6iHlfWSfar3bDUr 0GSFxBsv6pMKlFvuGCnGQn4Dj29la3m/RTc7BNmE67x2d/tBAEfBj75ehWiSYiPm6vmZ wtwA== 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=MJCQTS/JDn2YVvt/j7MEkkapAyJW1HZApPj+hLjrGoNXVPxYv4TIy1bHocaeqSW2pk CVJ3tlTOkGQBr/er1MBj5TlUzZ8ZNnVPUqMrjtm1+nVe9HGu5EtnQ8MNKtFVbGrpYJrq u+FAXD6TN/TQj0NDjdxFzgfHxPzj78v3rgzGiQcWAq1ZzSrbLcq5H10s6B0Q2KXeahyG cRRCIrL2b4U4LisWugPmwH5iGakHlHRGaYbve6RlNHRjn7yGEtvvJ1S7hrbcq+6+Dl3p QIwMNDiMyh1fjsgLgscaGHksIkKoKLn8mCSEXxxDoI8oc7Z1RM4OpJnsVIzjn2wrU3YX x6Qw== X-Gm-Message-State: AFqh2krhQf4U9thjnKvf3Ytxgbf2Izvf6A+lFLF12W15B7aJpIudwDZQ Vv/WEMPEYdaDk9g4uXhaCg1/JN5NApyNIad/5Dc= X-Google-Smtp-Source: AMrXdXsP7OeaTO7rYbvGjkdbH8Wu9ysUOPky7xJ0sSFSf7QX6+vE8iVMLa14TlntXFXjYHaOW5G5NQ== X-Received: by 2002:a17:902:e983:b0:194:6265:ba61 with SMTP id f3-20020a170902e98300b001946265ba61mr559766plb.27.1673891495969; 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.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Jan 2023 09:51:35 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Olivier Matz Subject: [PATCH v2 6/7] cmdline: fix whitespace Date: Mon, 16 Jan 2023 09:51:26 -0800 Message-Id: <20230116175127.87346-7-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 --- 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