lkml.org 
[lkml]   [2005]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [TRIVIAL] Error checks omitted in init_tmpfs() in mm/tiny-shmem.c
On Mon, Oct 24, 2005 at 01:45:18PM -0700, Matt Mackall wrote:

> > --- linux-2.6.13.4/mm/tiny-shmem.c 2005-10-10 13:54:29.000000000 -0500
> > +++ linux-2.6.13.4-edit/mm/tiny-shmem.c 2005-10-24 03:43:38.614071000 -0500
> > @@ -31,12 +31,18 @@
> >
> > static int __init init_tmpfs(void)
> > {
> > - register_filesystem(&tmpfs_fs_type);
> > + int error;
> > +
> > + error = register_filesystem(&tmpfs_fs_type);
> > + BUG_ON(error);
>
> Can we just do BUG_ON(register_filesystem() != 0)?

It seems a little risky to me to rely on a macro always evaluating its
arguments, even though this one does on every kernel version I
checked.

Cheers,
Muli
--
Muli Ben-Yehuda
http://www.mulix.org | http://mulix.livejournal.com/
-
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-10-24 23:04    [W:0.095 / U:0.044 seconds]
©2003-2011 Jasper Spaans