Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Mar 2022 18:19:09 GMT
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 5e5c14493cba - stable/13 - Fix indentation in usr.bin/diff/pr.c
Message-ID:  <202203121819.22CIJ9tn063361@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by dim:

URL: https://cgit.FreeBSD.org/src/commit/?id=5e5c14493cba62d7c38c0be7650387a493f61b44

commit 5e5c14493cba62d7c38c0be7650387a493f61b44
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-02-28 20:06:19 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-03-12 18:18:32 +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
    
    (cherry picked from commit f7d6e97e4bf1fe4c70d5b0ef9fdf649bf07e1c91)
---
 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);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202203121819.22CIJ9tn063361>