Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1453005

Re: xfs_icache.c:1298]: (style) Redundant condition

From Christoph Hellwig <hch@infradead.org>
Newsgroups linux.kernel
Subject Re: xfs_icache.c:1298]: (style) Redundant condition
Date 2016-08-01 08:40 +0200
Message-ID <s1f3j-2I4-1@gated-at.bofh.it> (permalink)
References <rYPPH-6aR-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Jul 25, 2016 at 04:13:28PM +0100, David Binderman wrote:
> Hello there,
> 
> linux-4.7/fs/xfs/xfs_icache.c:1298]: (style) Redundant condition:
> eofb. '!eofb || (eofb && eofb.eof_scan_owner!=0)' is equivalent to
> '!eofb || eofb.eof_scan_owner!=0'
> 
> Source code is
> 
>    ASSERT(!eofb || (eofb && eofb->eof_scan_owner != 0));
> 
> Maybe better code
> 
>    ASSERT(!eofb || (eofb->eof_scan_owner != 0));

Yes, that would be better.  But it's probably not worth changing
existing code just for that.

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: xfs_icache.c:1298]: (style) Redundant condition Christoph Hellwig <hch@infradead.org> - 2016-08-01 08:40 +0200

csiph-web