[Bug 210093] Redundant sq initialization in kern/subr_sleepqueue

[email protected]
Newsgroups gmane.os.freebsd.devel.threading
Message-ID <[email protected]/bugzilla/>
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=210093

John Baldwin <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|New                         |Closed
                 CC|                            |[email protected]
         Resolution|---                         |Works As Intended

--- Comment #3 from John Baldwin <[email protected]> ---
If the INVARIANTS block didn't have to define a variable we probably wouldn't
do it twice.  We could fix it but it would have to be a bit uglier:

#ifdef INVARIANTS
   int i;
#endif

   sq = td->td_sleepqueue;
#ifdef INVARIANTS
   for (i = 0; ...) {
   }
   ...
   sq->sq_lock = lock;
#endif
   ...

If our style permitted C99-type 'for (int i' that would be a simple way to
solve it, but it doesn't.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-threads
To unsubscribe, send any mail to "[email protected]"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.