On Sun, May 21, 2006 at 02:51:54AM -0700, [email protected] wrote:
> - if ((ret = insert_vm_struct(mm, vma))) {
> + ret = insert_vm_struct(mm, vma);
> + if (ret) {
Urgh.
It's not really any cleaner/clearer so why do that?
Chris Wedgwood <[email protected]> wrote:
>
> On Sun, May 21, 2006 at 02:51:54AM -0700, [email protected] wrote:
>
> > - if ((ret = insert_vm_struct(mm, vma))) {
> > + ret = insert_vm_struct(mm, vma);
> > + if (ret) {
>
> Urgh.
>
> It's not really any cleaner/clearer so why do that?
>
Because it's cleaner and clearer and because Linus said.
One is an assignment and the other is a test. These have nothing to do
with each other.
Keep it simple.
On Sun, May 21, 2006 at 05:09:51AM -0700, Andrew Morton wrote:
> Because it's cleaner and clearer
some would disagree
> and because Linus said.
ok, sure, that works (i don't personally agree, but if there is
contention it's best that someone just stands up and says "because i
said so")
> One is an assignment and the other is a test. These have nothing to
> do with each other.
should there be a comment in codingstyle about this then perhaps?