git: 8d8bfdf20dc4 - stable/13 - Rework for-loop in EPOCH(9) to reduce indentation level.

Hans Petter Selasky hselasky at FreeBSD.org
Wed Jun 2 12:24:46 UTC 2021


The branch stable/13 has been updated by hselasky:

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

commit 8d8bfdf20dc473a163c74bcd00b94b083f81ae0c
Author:     Hans Petter Selasky <hselasky at FreeBSD.org>
AuthorDate: 2021-05-21 08:20:34 +0000
Commit:     Hans Petter Selasky <hselasky at FreeBSD.org>
CommitDate: 2021-06-02 11:12:34 +0000

    Rework for-loop in EPOCH(9) to reduce indentation level.
    
    No functional change intended.
    
    Sponsored by:   Mellanox Technologies // NVIDIA Networking
    
    (cherry picked from commit cc9bb7a9b863c018a069a71392fa9baea98b5fdb)
---
 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;


More information about the dev-commits-src-all mailing list