From: Markus Elfring
Date: Mon, 21 Dec 2015 18:15:45 +0100
Six goto statements referred to a source code position
directly behind them.
Thus omit such unnecessary jumps.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring
---
drivers/staging/lustre/lustre/l
On Tue, 2015-12-15 at 19:49 +0100, SF Markus Elfring wrote:
> > I think there should _not_ be a hardened rule.
> I guess that it can become hard to achieve consensus on a precise rule.
Consensus isn't unanimity.
> I imagine that your feedback
> can cause further software development troubles if t
On Tue, Dec 15, 2015 at 07:02:31AM -0800, Joe Perches wrote:
> This is the original code:
>
> result = foo();
> if (result)
> goto label;
>
> result = bar();
> if (result)
> goto label;
>
> result = baz();
> if (result)
>
> I think there should _not_ be a hardened rule.
I guess that it can become hard to achieve consensus on a precise rule.
> Style is just a guide.
Generally nice …
> Do what you think appropriate.
I'm sorry for my evolving understanding. - But I imagine that your feedback
can cause further
On Tue, 2015-12-15 at 19:26 +0100, SF Markus Elfring wrote:
> > rc = mdc_queue_wait(req);
> > goto out;
> > out:
> > ptlrpc_req_finished(req);
> > return rc;
> > }
> > -
> >
> > I think if the last goto out; is to be removed,
> > then it should be replaced by a
> rc = mdc_queue_wait(req);
> goto out;
> out:
> ptlrpc_req_finished(req);
> return rc;
> }
> -
>
> I think if the last goto out; is to be removed,
> then it should be replaced by a blank line.
>
> It separates the last operation block from the return.
On Tue, 2015-12-15 at 19:02 +0100, SF Markus Elfring wrote:
> > This is the original code:
> Really …?
> > result = baz();
> > if (result)
> > goto label;
> >
> > label:
> > go on...
>
> I do not see such a source code structure
> at the six places I propose to clean-up.
>
On Tue, 2015-12-15 at 20:48 +0300, Dan Carpenter wrote:
> On Tue, Dec 15, 2015 at 07:02:31AM -0800, Joe Perches wrote:
> > This is the original code:
> >
> > result = foo();
> > if (result)
> > goto label;
> >
> > result = bar();
> > if (result)
> > goto la
> This is the original code:
Really …?
> result = baz();
> if (result)
> goto label;
>
> label:
> go on...
I do not see such a source code structure
at the six places I propose to clean-up.
> I don't find the test->goto label; label: use offensive,
> but if he doe
On Tue, 2015-12-15 at 17:41 +0300, Dan Carpenter wrote:
> On Tue, Dec 15, 2015 at 06:27:56AM -0800, Joe Perches wrote:
> > On Sun, 2015-12-13 at 14:52 +0100, SF Markus Elfring wrote:
> > > From: Markus Elfring
> > > Date: Sun, 13 Dec 2015 09:30:47 +0100
> > >
> > > Six goto statements referred to
On Tue, Dec 15, 2015 at 06:27:56AM -0800, Joe Perches wrote:
> On Sun, 2015-12-13 at 14:52 +0100, SF Markus Elfring wrote:
> > From: Markus Elfring
> > Date: Sun, 13 Dec 2015 09:30:47 +0100
> >
> > Six goto statements referred to a source code position directly behind them.
> > Thus omit such unn
On Sun, 2015-12-13 at 14:52 +0100, SF Markus Elfring wrote:
> From: Markus Elfring
> Date: Sun, 13 Dec 2015 09:30:47 +0100
>
> Six goto statements referred to a source code position directly behind them.
> Thus omit such unnecessary jumps.
I suggest you leave a blank line instead
of deleting the
From: Markus Elfring
Date: Sun, 13 Dec 2015 09:30:47 +0100
Six goto statements referred to a source code position directly behind them.
Thus omit such unnecessary jumps.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring
---
drivers/staging/lustre/lustre/l
13 matches
Mail list logo