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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070702203853.GA13904@filer.fsl.cs.sunysb.edu>
Date:	Mon, 2 Jul 2007 16:38:53 -0400
From:	Josef Sipek <jsipek@....cs.sunysb.edu>
To:	Adrian Bunk <bunk@...sta.de>
Cc:	Andrew Morton <akpm@...ux-foundation.org>, ezk@...sunysb.edu,
	jsipek@...sunysb.edu, linux-kernel@...r.kernel.org,
	unionfs@...esystems.org
Subject: Re: [-mm patch] unionfs: make functions static

On Mon, Jul 02, 2007 at 04:27:59AM +0200, Adrian Bunk wrote:
> On Sun, Jul 01, 2007 at 09:42:49PM -0400, Josef Sipek wrote:
> > On Sun, Jul 01, 2007 at 10:23:30PM +0200, Adrian Bunk wrote:
> > > This patch makes some needlessly global functions static.
> > > 
> > ...
> > > --- linux-2.6.22-rc6-mm1/fs/unionfs/lookup.c.old	2007-07-01 00:05:02.000000000 +0200
> > > +++ linux-2.6.22-rc6-mm1/fs/unionfs/lookup.c	2007-07-01 00:06:05.000000000 +0200
> > > @@ -18,6 +18,8 @@
> > >  
> > >  #include "union.h"
> > >  
> > > +static int realloc_dentry_private_data(struct dentry *dentry);
> > > +
> > >  /* is the filename valid == !(whiteout for a file or opaque dir marker) */
> > 
> > I forget who said it, but someone wasn't very happy with prototypes like
> > that in .c files. What's the prefered way - are they ok for static symbols?
> 
> It might have even been me who said this - but about global functions.
> 
> For global functions, prototypes in header files allow gcc to check 
> whether the prototype matches the actual function. With a prototype
> in the C file of the caller that's not possible, and if they are 
> different it can result in nasty runtime errors.
> 
> For static functions that's not an issue since gcc sees both the 
> prototype and the actual function.
 
Ok, fair enough. Applied & pushed to korg tree.

Thanks.

Josef "Jeff" Sipek.

-- 
Once you have their hardware. Never give it back.
(The First Rule of Hardware Acquisition)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ