From owner-freebsd-bugs@FreeBSD.ORG Mon Aug 24 07:10:02 2009 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3333A1065691 for ; Mon, 24 Aug 2009 07:10:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 0D33E8FC13 for ; Mon, 24 Aug 2009 07:10:02 +0000 (UTC) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n7O7A1rG075951 for ; Mon, 24 Aug 2009 07:10:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n7O7A19A075950; Mon, 24 Aug 2009 07:10:01 GMT (envelope-from gnats) Resent-Date: Mon, 24 Aug 2009 07:10:01 GMT Resent-Message-Id: <200908240710.n7O7A19A075950@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Nick Hibma Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7646B106568C for ; Mon, 24 Aug 2009 07:06:28 +0000 (UTC) (envelope-from nick@van-laarhoven.org) Received: from CPSMTPM-EML110.kpnxchange.com (cpsmtpm-eml110.kpnxchange.com [195.121.3.14]) by mx1.freebsd.org (Postfix) with ESMTP id 07E388FC25 for ; Mon, 24 Aug 2009 07:06:27 +0000 (UTC) Received: from uitsmijter.van-laarhoven.org ([81.207.207.222]) by CPSMTPM-EML110.kpnxchange.com with Microsoft SMTPSVC(7.0.6001.18000); Mon, 24 Aug 2009 09:06:22 +0200 Received: from hind.van-laarhoven.org (HIND.van-laarhoven.org [10.66.0.147]) by uitsmijter.van-laarhoven.org (8.14.3/8.14.3) with ESMTP id n7O711SJ065774 for ; Mon, 24 Aug 2009 09:06:18 +0200 (CEST) (envelope-from nick@van-laarhoven.org) Received: from nick by hind.van-laarhoven.org with local (masqmail 0.2.21) id 1MfTTl-5rZ-00 for ; Mon, 24 Aug 2009 08:56:33 +0200 Message-Id: <1MfTTl-5rZ-00@hind.van-laarhoven.org> Date: Mon, 24 Aug 2009 08:56:33 +0200 From: Nick Hibma To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: kern/138125: bad style in kern_clock.c (confusing as well) X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Aug 2009 07:10:02 -0000 >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: