[Ocfs2-devel] linux-4.6-rc2/fs/ocfs2/refcounttree.c:987]: (style) Redundant condition

Gang He ghe at suse.com
Tue Apr 19 23:36:28 PDT 2016


Yes, "!eb || !eb.h_next_leaf_blk" looks more readable.

Thanks
Gang



>>> 
> Hello there,
> 
> linux-4.6-rc2/fs/ocfs2/refcounttree.c:987]: (style) Redundant condition: eb. 
> '!eb || (eb && !eb.h_next_leaf_blk)' is equivalent to '!eb || 
> !eb.h_next_leaf_blk'
> 
> Source code is
> 
>         if (!eb || (eb && !eb->h_next_leaf_blk)) {
> 
> Also,
> 
> linux-4.6-rc2/fs/ocfs2/refcounttree.c:1011] -> 
> [linux-4.6-rc2/fs/ocfs2/refcounttree.c:987]: (warning) Either the condition 
> 'eb' is redundant or there is possible null pointer dereference: eb.
> 
> 
> Regards
> 
> David Binderman
> 
>  		 	   		  
> _______________________________________________
> Ocfs2-devel mailing list
> Ocfs2-devel at oss.oracle.com 
> https://oss.oracle.com/mailman/listinfo/ocfs2-devel




More information about the Ocfs2-devel mailing list