From nobody Fri Mar 04 19:48:44 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6AB2019F1D6A; Fri, 4 Mar 2022 19:48:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4K9JM1096Lz4tCP; Fri, 4 Mar 2022 19:48:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646423325; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g5vFxktJV/IAjRqTxMBgCMz7I7oSLuOc9g/b8fU6I+k=; b=ccuQaRX4g8AVgFgZCeukC49ic0iCoyf6rdUg0We9luWxih7P9WurvFsGkWEk6VcwUQ47ne lQAmNyTKqK0YtdTvR3CMmcylWyuxwdPY7bLKgw+PbBzfEKrFEETgqXY7CyY+AREZuhNaQs SLrqLCtIYSR0dKHdWvNSxIb+MEQcg7iG5RT7WsxIJCbcXgaLGyNYosYSDz4ibZqpordhcN m1/RLzT+yvGiQDzs/ghyRkck5ulViUXGvOjnlBDK/Jmckthv1KHew6dA8G+7MGzNPi8uDe iIlDzfRij1zQUoi6QI6ipkPtjlET3g+Oe253Q+a3uSEXlhQHwUDiND7w7YQk9g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B0F05124E5; Fri, 4 Mar 2022 19:48:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 224Jmi7A069433; Fri, 4 Mar 2022 19:48:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 224Jmikb069432; Fri, 4 Mar 2022 19:48:44 GMT (envelope-from git) Date: Fri, 4 Mar 2022 19:48:44 GMT Message-Id: <202203041948.224Jmikb069432@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric Subject: git: f7d6e97e4bf1 - main - Fix indentation in usr.bin/diff/pr.c List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f7d6e97e4bf1fe4c70d5b0ef9fdf649bf07e1c91 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646423325; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g5vFxktJV/IAjRqTxMBgCMz7I7oSLuOc9g/b8fU6I+k=; b=b99LT0CFbKU554zYm1BRNALgQup2s2mLrUvJVeg1xRe+SVTfrc63Y/hjVwasEkFGzG1V3W J18xve2TMerlCFMwBgDO3CwHf/G9CBJthQDaF/xZBnmSQM/45YVzQTPajmSDDTw3VWUbSO 4xy8qgFBHtIywcwzpL+bEDLSMNaPK8FwVHoEzGfI1SjQycRMFHiUMbBmnDuyjosl4scNHR 8a/Nsz2uZIuTH0r6NFYqDSqEuzkYFGYIq5xa9qyH7GsZ8CiVdCu9jkD1rt3wZB687NU6ok sZG67vgCHE7PDdIZjz58yXJ2HKpGEMKpGKm9KcswWB2BVrgjG9PlF0lvoPZw1Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1646423325; a=rsa-sha256; cv=none; b=vKix+boKbXmdKKHrSC2ZEbBfRZYx+X1eEy1/k7oNaiNpd1r0xMO1B8irbyFFJWgUnfMDlm dh+fFaUOlHvw6dI43gYItocr9v43tn4oE1W6JTUtVUFWUZhg45zn/M6dM75JfcjuFSzvWL 8aN73D9NAVXDW/LdKtbTCbn5lEmfs6TtOvMfcIdJmXdWdqDFTkui/Exsqi84iUgx/QdIel nubqMPRXrhBJFWaAcp/WPxmtDc1Ei66TdI1pP1S2BV/20zvBynDgF5JaVGpvdELsy5VALl D6qfPaLPFcsVQ+1MjuF84fT4vIW9iULmHpf26HLXcZiTBhvU1zzH7QasjzOxJw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=f7d6e97e4bf1fe4c70d5b0ef9fdf649bf07e1c91 commit f7d6e97e4bf1fe4c70d5b0ef9fdf649bf07e1c91 Author: Dimitry Andric AuthorDate: 2022-02-28 20:06:19 +0000 Commit: Dimitry Andric CommitDate: 2022-03-04 19:46:56 +0000 Fix indentation in usr.bin/diff/pr.c In commit 6fa5bf0832ef the pr(1) related code in diff was moved around, but some part of the indentation was messed up, and one line was duplicated. Remove the duplicated line, and fix up the indentation. Reviewed by: bapt MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D34398 --- usr.bin/diff/pr.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/usr.bin/diff/pr.c b/usr.bin/diff/pr.c index b03df9afc028..4c7108cd7451 100644 --- a/usr.bin/diff/pr.c +++ b/usr.bin/diff/pr.c @@ -81,19 +81,18 @@ start_pr(char *file1, char *file2) pr->ostdout = dup(STDOUT_FILENO); dup2(pfd[1], STDOUT_FILENO); close(pfd[1]); - close(pfd[1]); - } - close(pfd[0]); - rewind(stdout); - free(header); - pr->kq = kqueue(); - if (pr->kq == -1) - err(2, "kqueue"); - pr->e = xmalloc(sizeof(struct kevent)); - EV_SET(pr->e, pr_pd, EVFILT_PROCDESC, EV_ADD, NOTE_EXIT, 0, - NULL); - if (kevent(pr->kq, pr->e, 1, NULL, 0, NULL) == -1) - err(2, "kevent"); + } + close(pfd[0]); + rewind(stdout); + free(header); + pr->kq = kqueue(); + if (pr->kq == -1) + err(2, "kqueue"); + pr->e = xmalloc(sizeof(struct kevent)); + EV_SET(pr->e, pr_pd, EVFILT_PROCDESC, EV_ADD, NOTE_EXIT, 0, + NULL); + if (kevent(pr->kq, pr->e, 1, NULL, 0, NULL) == -1) + err(2, "kevent"); } return (pr); }