lkml.org 
[lkml]   [2016]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 3/11] cpufreq: governor: Use common global_dbs_data pointer
    On 04-02-16, 02:25, Rafael J. Wysocki wrote:
    > You are talking about something like this now:
    >
    > if (condition)
    > goto label;
    >
    > return 0;
    >
    > label:
    > do stuff
    >
    > I'm sorry, but I fail to see how this is easier to read than
    >
    > if (!condition)
    > return 0;
    >
    > do stuff

    I have seen few people (Like Dan Carpenter), mostly coccinelle guys,
    saying that we should write code like this:

    if (error)
    ...

    return success;

    Though I should accept that I would have written code the way Rafael
    has done this time, but those people get back everytime :)

    --
    viresh

    \
     
     \ /
      Last update: 2016-02-04 07:21    [W:7.663 / U:0.040 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site