Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 May 2021 09:25:34 GMT
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: cc9bb7a9b863 - main - Rework for-loop in EPOCH(9) to reduce indentation level.
Message-ID:  <202105210925.14L9PY9c070773@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by hselasky:

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

commit cc9bb7a9b863c018a069a71392fa9baea98b5fdb
Author:     Hans Petter Selasky <hselasky@FreeBSD.org>
AuthorDate: 2021-05-21 08:20:34 +0000
Commit:     Hans Petter Selasky <hselasky@FreeBSD.org>
CommitDate: 2021-05-21 09:21:32 +0000

    Rework for-loop in EPOCH(9) to reduce indentation level.
    
    No functional change intended.
    
    MFC after:      1 week
    Sponsored by:   Mellanox Technologies // NVIDIA Networking
---
 sys/kern/subr_epoch.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/sys/kern/subr_epoch.c b/sys/kern/subr_epoch.c
index 48567f97dcfa..210cf78d55f0 100644
--- a/sys/kern/subr_epoch.c
+++ b/sys/kern/subr_epoch.c
@@ -219,12 +219,14 @@ epoch_trace_enter(struct thread *td, epoch_t epoch, epoch_tracker_t et,
 {
 	epoch_tracker_t iet;
 
-	SLIST_FOREACH(iet, &td->td_epochs, et_tlink)
-		if (iet->et_epoch == epoch)
-			epoch_trace_report("Recursively entering epoch %s "
-			    "at %s:%d, previously entered at %s:%d\n",
-			    epoch->e_name, file, line,
-			    iet->et_file, iet->et_line);
+	SLIST_FOREACH(iet, &td->td_epochs, et_tlink) {
+		if (iet->et_epoch != epoch)
+			continue;
+		epoch_trace_report("Recursively entering epoch %s "
+		    "at %s:%d, previously entered at %s:%d\n",
+		    epoch->e_name, file, line,
+		    iet->et_file, iet->et_line);
+	}
 	et->et_epoch = epoch;
 	et->et_file = file;
 	et->et_line = line;



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