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>] [day] [month] [year] [list]
Message-ID: <676505.1733250201@warthog.procyon.org.uk>
Date: Tue, 03 Dec 2024 18:23:21 +0000
From: David Howells <dhowells@...hat.com>
To: Andy Whitcroft <apw@...onical.com>, Joe Perches <joe@...ches.com>
cc: dhowells@...hat.com, linux-kernel@...r.kernel.org
Subject: Checkpatch miscomplaint about multi-arm if-statement

Hi,

I'm seeing this:

	WARNING: else is not generally useful after a break or return
	#1220: FILE: net/rxrpc/sendmsg.c:301:
	+               return -ENOMEM;
	+       } else {

on:

	if (call->send_queue) {
		tq->qbase = call->send_top + 1;
		call->send_queue->next = tq;
		call->send_queue = tq;
	} else if (WARN_ON(call->tx_queue)) {
		kfree(tq);
		return -ENOMEM;
	} else {
		tq->qbase = 0;
		call->tx_qbase = 0;
		call->send_queue = tq;
		call->tx_qtail = tq;
		call->tx_queue = tq;
	}

but you cannot eliminate the last 'else' statement there.

David


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ