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] [day] [month] [year] [list]
Date:   Tue, 8 Aug 2023 14:55:25 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Breno Leitao <leitao@...ian.org>
Cc:     rdunlap@...radead.org, benjamin.poirier@...il.com,
        davem@...emloft.net, edumazet@...gle.com,
        Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org (open list)
Subject: Re: [PATCH net-next v4 1/2] netconsole: Create a allocation helper

On Fri,  4 Aug 2023 05:43:20 -0700 Breno Leitao wrote:
> +	struct netconsole_target *nt = alloc_and_init();
> +	int err = -ENOMEM;
> +
> +	if (!nt)
> +		goto fail;

No complex code in the variable init, please.
Makes the code harder to read.

	struct netconsole_target *nt;
	int err;

	nt = alloc_and_init();
	if (!nt) {
		err = -ENOMEM;
		goto fail;
	}
-- 
pw-bot: cr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ