kern/138125: bad style in kern_clock.c (confusing as well)
Nick Hibma
nick at van-laarhoven.org
Mon Aug 24 07:10:02 UTC 2009
>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 at 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:
More information about the freebsd-bugs
mailing list