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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]