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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAL26m8LtBr7i_MmTS23PJA9qMnvWMcmmcU3sO0pj1qg2CiogOg@mail.gmail.com>
Date:	Mon, 25 Jul 2011 11:06:58 -0700
From:	Vaibhav Nagarnaik <vnagarnaik@...gle.com>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	Michael Rubin <mrubin@...gle.com>,
	David Sharp <dhsharp@...gle.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/4] trace-cmd: Handle opcode parsing error

On Mon, Jul 25, 2011 at 7:01 AM, Steven Rostedt <rostedt@...dmis.org> wrote:
> On Fri, 2011-07-15 at 20:00 -0700, Vaibhav Nagarnaik wrote:
>>
>>  /* Note, *tok does not get freed, but will most likely be saved */
>> @@ -1706,7 +1706,10 @@ process_op(struct event_format *event, struct print_arg *arg, char **tok)
>>               arg->op.op = token;
>>               arg->op.left = left;
>>
>> -             set_op_prio(arg);
>> +             if (-1 == set_op_prio(arg)) {
>
> I'm fine with the patch up to here. I understand the constant first
> compare, but it doesn't make sense here. Either use:
>
>        if (set_op_prio(arg) < 0) ...
>  or
>        if (set_op_prio(arg) == -1)...
>
>
> The reason the -1 == doesn't make sense is because:
>
>        if (set_op_proi(arg) = -1)
>
> would fail too.
>
> And it is much easier to read.
>
> -- Steve
>

Sure. I am sending the updated patch.

>> +                     event->flags |= EVENT_FL_FAILED;
>> +                     goto out_free;
>> +             }
>>
>>               type = read_token_item(&token);
>>               *tok = token;
>
>
>

Vaibhav Nagarnaik
--
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