[Bug 210093] Redundant sq initialization in kern/subr_sleepqueue
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Thu Aug 4 19:40:44 UTC 2016
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=210093
John Baldwin <jhb at FreeBSD.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|New |Closed
CC| |jhb at FreeBSD.org
Resolution|--- |Works As Intended
--- Comment #3 from John Baldwin <jhb at FreeBSD.org> ---
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.
More information about the freebsd-threads
mailing list