lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4549F633.9010902@in.ibm.com>
Date:	Thu, 02 Nov 2006 19:14:19 +0530
From:	Balbir Singh <balbir@...ibm.com>
To:	Oleg Nesterov <oleg@...sign.ru>
CC:	Andrew Morton <akpm@...l.org>, Thomas Graf <tgraf@...g.ch>,
	Shailabh Nagar <nagar@...son.ibm.com>, Jay Lan <jlan@....com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] taskstats: factor out reply assembling

Oleg Nesterov wrote:
> On 11/02, Balbir Singh wrote:
>> Oleg Nesterov wrote:
>>> +
>>> +	aggr = TASKSTATS_TYPE_AGGR_TGID;
>>> +	if (type == TASKSTATS_TYPE_PID)
>>> +		aggr = TASKSTATS_TYPE_AGGR_PID;
>> How about using
>>
>> aggr = (type == TASKSTATS_TYPE_PID) ? TASKSTATS_TYPE_AGGR_PID  :
>> 				TASKSTATS_TYPE_AGGR_TGID;
> 
> I personally think this is much better. In fact, i did exactly same, but
> then changed it because (I think) CodingStyle police doesn't like '?:'.
> 
> Or it does?
> 
> Oleg.
> 

There is an issue with double assignment if the type is TASKSTATS_TYPE_PID most
of the time. I see the '?' operator in several places in the code.

-- 

	Balbir Singh,
	Linux Technology Center,
	IBM Software Labs
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ