[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8da15fe8-92be-ee9c-0c45-1a4af38fc9bd@gmail.com>
Date: Fri, 11 Feb 2022 21:30:11 +0300
From: Maxim Petrov <mmrmaximuzz@...il.com>
To: stephen@...workplumber.org
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH iproute2] libnetlink: fix socket leak in
rtnl_open_byproto()
Hello Stephen!
On 2022-02-11 01:19 UTC, Stephen Hemminger wrote:
> + } else {
> + rth->seq = time(NULL);
> + return 0;
> }
For me it looks slightly alien as the normal flow jumps from one 'else if' to
another, and the final return statement is hidden inside the else block. The
original version is straightforward and less surprising.
> Can do the same thing without introducing a goto
But what's wrong with the goto here? I thought it is a perfectly legal C way to
handle errors, and iproute2 uses it for that purpose almost everywhere.
Powered by blists - more mailing lists