I actually disagree with this. I can see you like ?: but I find it very 
hard to remember what it means.

M

On 07/01/14 17:08, Edward Welbourne wrote:
>
> In cf-agent/files_editline.c:
>
> > +    const Item *ip = begin;
> > +    char buf[CF_BUFSIZE];
> > +    int lines = 0;
> > +
> > +    for (const char *sp = chunk; sp <= chunk + strlen(chunk); sp++)
> > +    {
> > +        memset(buf, 0, CF_BUFSIZE);
> > +        sscanf(sp, "%[^\n]", buf);
> > +        sp += strlen(buf);
> > +
> > +        if (ip == NULL)
> > +        {
> > +            return false;
> > +        }
> > +
> > +        if (!regex && strcmp(buf, ip->name) != 0)
>
> These two conditionals (one !regex &&, the other regex &&) would be 
> clearer as: |
> if (regex ? !FullTextMatch(ctx, buf, ip->name) : strcmp(buf, 
> ip->name)) { return false; }
> |
>
> —
> Reply to this email directly or view it on GitHub 
> <https://github.com/cfengine/core/pull/1245/files#r8697065>.
>

-- 
CTO and Founder CFEngine
Author of In Search Of Certainty: The Science of our Information 
Infrastructure <http://markburgess.org>