The branch main has been updated by imp:

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

commit 1eebd6158cccf12f3b057d6a1adf9d40ec59844c
Author:     Warner Losh <[email protected]>
AuthorDate: 2021-04-21 21:35:54 +0000
Commit:     Warner Losh <[email protected]>
CommitDate: 2021-04-21 21:37:24 +0000

    newbus: Optimize/Simplify kobj_class_compile_common a little
    
    "i" is not used in this loop at all. There's no need to initialize and
    increment it.
    
    Reviewed by:            markj@
    Sponsored by:           Netflix
    Differential Revision:  https://reviews.freebsd.org/D29898
---
 sys/kern/subr_kobj.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/kern/subr_kobj.c b/sys/kern/subr_kobj.c
index d001450cba6f..17d23336e333 100644
--- a/sys/kern/subr_kobj.c
+++ b/sys/kern/subr_kobj.c
@@ -112,7 +112,7 @@ kobj_class_compile_common(kobj_class_t cls, kobj_ops_t ops)
        /*
         * First register any methods which need it.
         */
-       for (i = 0, m = cls->methods; m->desc; i++, m++) {
+       for (m = cls->methods; m->desc; m++) {
                if (m->desc->id == 0)
                        m->desc->id = kobj_next_id++;
        }
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main
To unsubscribe, send any mail to "[email protected]"

Reply via email to