[Ocfs2-devel] Patch to add some error checking to super.c

Manish Singh manish.singh at oracle.com
Tue Feb 10 18:06:42 CST 2004


On Tue, Feb 10, 2004 at 05:16:22PM -0800, John Villalovos wrote:
> I am starting to explore the code and I started at super.c.
> 
> Here is a patch to add some error checking.  It also removes a redundant 
> INIT_LIST_HEAD call.

Cool.
 
> +	if ( !OcfsGlobalCtxt.oin_cache ) return -ENOMEM;

When dealing with a code base, it's best to use the style the rest of the
file uses. So stuff like:

	if (!OcfsGlobalCtxt.oin_cache)
		return -ENOMEM;

is preferred, or even OcfsGlobalCtxt.oin_cache == NULL

-Manish


More information about the Ocfs2-devel mailing list