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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170408093244.593a8624@plumbers-lap.home.lan>
Date:   Sat, 8 Apr 2017 09:32:44 -0400
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     <idosch@...lanox.com>
Cc:     <netdev@...r.kernel.org>, <davem@...emloft.net>,
        <bridge@...ts.linux-foundation.org>, <peter@...nota.eu>,
        <cera@...a.cz>, <mlxsw@...lanox.com>, <nikolay@...ulusnetworks.com>
Subject: Re: [PATCH net v2 2/2] bridge: netlink: register netdevice before
 executing changelink

On Sat, 8 Apr 2017 14:41:59 +0300
<idosch@...lanox.com> wrote:

> +	err = br_changelink(dev, tb, data);
> +	if (err)
> +		goto unregister;
> +
> +	return 0;
> +
> +unregister:
> +	unregister_netdevice(dev);
> +	return err;
>  }

Why use a goto? just do:
	err = br_changelink(dev, tb, data);
	if (err)
		unregister_netdevice(dev)
	return err;
}


The goto looks ugly

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ