git: cc9bb7a9b863 - main - Rework for-loop in EPOCH(9) to reduce indentation level.
Hans Petter Selasky
hselasky at FreeBSD.org
Fri May 21 09:25:34 UTC 2021
The branch main has been updated by hselasky:
URL: https://cgit.FreeBSD.org/src/commit/?id=cc9bb7a9b863c018a069a71392fa9baea98b5fdb
commit cc9bb7a9b863c018a069a71392fa9baea98b5fdb
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-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;
More information about the dev-commits-src-main
mailing list