[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190122144639.0f3eec31@cakuba.netronome.com>
Date: Tue, 22 Jan 2019 14:46:39 -0800
From: Jakub Kicinski <jakub.kicinski@...ronome.com>
To: David Ahern <dsahern@...il.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org,
oss-drivers@...ronome.com
Subject: Re: [PATCH net] net/ipv6: don't return positive numbers when
nothing was dumped
On Tue, 22 Jan 2019 15:38:20 -0700, David Ahern wrote:
> > @@ -5120,6 +5120,9 @@ static int inet6_dump_addr(struct sk_buff *skb, struct netlink_callback *cb,
> > if (idev) {
> > err = in6_dump_addrs(idev, skb, cb, s_ip_idx,
> > &fillargs);
> > + if (err < 0)
> > + goto put_tgt_net;
> > + err = 0;
>
> Rather than have 2 goto's to the same target why not just:
>
> if (err > 0)
> err = 0;
My default is to keep success path less indented and to minimize
dependencies between code blocks. v2 coming in 3.. 2.. 1..
> > }
> > goto put_tgt_net;
> > }
> >
Powered by blists - more mailing lists