看板 FB_bugs 關於我們 聯絡資訊
>Number: 138125 >Category: kern >Synopsis: bad style in kern_clock.c (confusing as well) >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Aug 24 07:10:01 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Nick Hibma >Release: FreeBSD 7.2-STABLE i386 >Organization: AnyWi Technologies >Environment: System: FreeBSD hind.van-laarhoven.org 7.2-STABLE FreeBSD 7.2-STABLE #6 r196180:196225M: Mon Aug 17 14:28:06 CEST 2009 root@hind.van-laarhoven.org:/usr/obj/usr/src/sys/HIND i386 >Description: See diff below (bad use of curly braces, which creates confusing code. It also violates style(9). >How-To-Repeat: >Fix: Index: kern_clock.c =================================================================== --- kern_clock.c (revision 196180) +++ kern_clock.c (working copy) @@ -325,9 +325,9 @@ */ mtx_lock_spin_flags(&callout_lock, MTX_QUIET); ticks++; - if (!TAILQ_EMPTY(&callwheel[ticks & callwheelmask])) { + if (!TAILQ_EMPTY(&callwheel[ticks & callwheelmask])) need_softclock = 1; - } else if (softticks + 1 == ticks) + else if (softticks + 1 == ticks) ++softticks; mtx_unlock_spin_flags(&callout_lock, MTX_QUIET); >Release-Note: >Audit-Trail: >Unformatted: _______________________________________________ freebsd-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscribe@freebsd.org"