Re: [PATCH] bs_rbd: fix error assignment in if condition

FUJITA Tomonori <[email protected]> Fri, 25 Jul 2014 16:31:07 +0900 (JST)
Newsgroups org.kernel.vger.stgt
Message-ID <20140725.163107.1568838937885778732.fujita.tomonori@lab.ntt.co.jp>
On Wed, 23 Jul 2014 10:38:34 +0800
Ruoyu <[email protected]> wrote:

> The statement
> 
> if ((x == f()) < 0) {}
> 
> is strange. I think it should be
> 
> if ((x = f()) < 0) {}
> 
> For the reasone of coding style, I modify it as
> 
> x = f();
> if (x < 0) {}
> 
> Signed-off-by: Ruoyu <[email protected]>
> ---
>  usr/bs_rbd.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.