Date: Mon, 24 Aug 2009 08:56:33 +0200 From: Nick Hibma <nick@van-laarhoven.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: kern/138125: bad style in kern_clock.c (confusing as well) Message-ID: <1MfTTl-5rZ-00@hind.van-laarhoven.org> Resent-Message-ID: <200908240710.n7O7A19A075950@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1MfTTl-5rZ-00>