From owner-svn-src-all@FreeBSD.ORG Tue Apr 26 12:08:49 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 59143106566B; Tue, 26 Apr 2011 12:08:49 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe07.c2i.net [212.247.154.194]) by mx1.freebsd.org (Postfix) with ESMTP id 8D7AD8FC1C; Tue, 26 Apr 2011 12:08:48 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=118a5bn0tGnRZbUa9ClBty6BTuM1bA5mUZqmf2RHYp4= c=1 sm=1 a=SvYTsOw2Z4kA:10 a=oArLlKAruIoA:10 a=WQU8e4WWZSUA:10 a=Q9fys5e9bTEA:10 a=CL8lFSKtTFcA:10 a=i9M/sDlu2rpZ9XS819oYzg==:17 a=HVcOSVqeEClIJtUmUjUA:9 a=PUjeQqilurYA:10 a=i9M/sDlu2rpZ9XS819oYzg==:117 Received: from [188.126.198.129] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe07.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 118551104; Tue, 26 Apr 2011 14:08:34 +0200 From: Hans Petter Selasky To: Kostik Belousov Date: Tue, 26 Apr 2011 14:07:31 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.2-STABLE; KDE/4.4.5; amd64; ; ) References: <201104261139.p3QBduVx020817@svn.freebsd.org> <201104261344.00551.hselasky@c2i.net> <20110426115333.GP48734@deviant.kiev.zoral.com.ua> In-Reply-To: <20110426115333.GP48734@deviant.kiev.zoral.com.ua> X-Face: *nPdTl_}RuAI6^PVpA02T?$%Xa^>@hE0uyUIoiha$pC:9TVgl.Oq, NwSZ4V"|LR.+tj}g5 %V,x^qOs~mnU3]Gn; cQLv&.N>TrxmSFf+p6(30a/{)KUU!s}w\IhQBj}[g}bj0I3^glmC( :AuzV9:.hESm-x4h240C`9=w MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201104261407.31963.hselasky@c2i.net> Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Subject: Re: svn commit: r221059 - in head/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Apr 2011 12:08:49 -0000 On Tuesday 26 April 2011 13:53:33 Kostik Belousov wrote: > On Tue, Apr 26, 2011 at 01:44:00PM +0200, Hans Petter Selasky wrote: > > On Tuesday 26 April 2011 13:39:56 Konstantin Belousov wrote: > > > + pending = !!callout_stop(&timeout_task->c); > > > > pending = (callout_stop(&timeout_task->c) != 0); > > > > ? Hi, This is just a nit I noticed. > > This line is about conversion from a boolean value to {0, 1} value set. > If !! construct does not look stylish, then wouldn't we need to go > with > pending = (callout_stop(&timeout_task->c) != 0) ? 1 : 0; > instead ? The output from ! is already a boolean and "pending" is a u_int, so to be correct it should be similar to what you suggest. I'm not sure what case produce the less amount of code and which the compiler understands the best. Probably it does not matter that much. I was thinking that "!!" is depreceated, but "man style" is silent about it. > Feel free to adjust whatever variant you prefer and commit it. Ok. --HPS