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]
Message-ID: <1374716480.1924.18.camel@joe-AO722>
Date:	Wed, 24 Jul 2013 18:41:20 -0700
From:	Joe Perches <joe@...ches.com>
To:	Cong Wang <xiyou.wangcong@...il.com>
Cc:	linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [RFC PATCH - diffstat only] include/net: Remove extern from
 function prototypes

On Thu, 2013-07-25 at 01:27 +0000, Cong Wang wrote:
> On Tue, 23 Jul 2013 at 17:58 GMT, Joe Perches <joe@...ches.com> wrote:

You dropped the author from the cc list.
Always reply to the author.

> > Function prototypes don't need to be declared
> > extern in .h files.  It's assumed by the compiler
> > and is as unnecessary as using auto is when
> > declaring automatic/local variables in a block.
> >
> Since we all know this, why bother it?

If everyone knew this, new ones wouldn't be added.
But a lot are.

Removing extern makes prototypes shorter and more readable.
More prototypes fit in a single line
More arguments fit on a multi-line prototypes.

> Having "extern" doesn't harm
> readability, instead it probably helps.

Sure, just like auto does.  Why isn't that used?

> > I believe it makes grepping for extern useful as
> > all the matches are actual variables and structs.
> You need a semantic tool.

No, not really.  I'm fairly comfortable with spatch.
spatch takes a long time to run for a lot of things.



--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ