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-next>] [day] [month] [year] [list]
Date:	Mon, 10 May 2010 18:14:36 -0700
From:	Joe Perches <joe@...ches.com>
To:	netdev <netdev@...r.kernel.org>
Subject: drivers/net/ RFC: Remove return; before void function
 end-of-functions close brace

Many functions are declared void but use a return at end-of-function.

void function(void args...)
{
	[perform some calcs]
	...

	return;
}

Removing the unnecessary return; statements would save ~675 lines.
 
$ grep -rP --include=*.[ch] -l "return;\n}" drivers/net | \
  xargs perl -i -e 'local $/ ; while (<>) { s/\n[ \t\n]+return;\n}/\n}/g; print; }
$ git diff --shortstat drivers/net
 186 files changed, 0 insertions(+), 675 deletions(-)

Anyone think such patches acceptable/useful?

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists