lkml.org 
[lkml]   [2004]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Don't return void types from void functions.
Date
Followup to:  <40B43913.7010207@pobox.com>
By author: Jeff Garzik <jgarzik@pobox.com>
In newsgroup: linux.dev.kernel
>
> Linux Kernel Mailing List wrote:
> > diff -Nru a/drivers/net/tokenring/olympic.c b/drivers/net/tokenring/olympic.c
> > --- a/drivers/net/tokenring/olympic.c 2004-05-25 23:06:49 -07:00
> > +++ b/drivers/net/tokenring/olympic.c 2004-05-25 23:06:49 -07:00
> > @@ -1806,7 +1806,7 @@
> >
> > static void __exit olympic_pci_cleanup(void)
> > {
> > - return pci_unregister_driver(&olympic_driver) ;
> > + pci_unregister_driver(&olympic_driver) ;
> > }
>
>
> Can we make gcc error out when it finds this?
>

What's wrong with it? Seriously... "return foo();" is the closest
thing to a tailcall syntax as C/C++ has, and I've always considered it
a Total Fscking Pain in The Ass[TM] that it somehow thinks functions
returning void should have a different syntax than all other functions.

-hpa
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:03    [W:0.063 / U:0.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site