Date: Thu, 04 Aug 2016 19:40:44 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-threads@FreeBSD.org Subject: [Bug 210093] Redundant sq initialization in kern/subr_sleepqueue Message-ID: <bug-210093-16-WaiA10fbto@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-210093-16@https.bugs.freebsd.org/bugzilla/> References: <bug-210093-16@https.bugs.freebsd.org/bugzilla/>
index | next in thread | previous in thread | raw e-mail
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=210093 John Baldwin <jhb@FreeBSD.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|New |Closed CC| |jhb@FreeBSD.org Resolution|--- |Works As Intended --- Comment #3 from John Baldwin <jhb@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.help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-210093-16-WaiA10fbto>
