From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sergei Antonov Subject: Re: [patch] hfsplus: add missing curly braces in hfsplus_delete_cat() Date: Wed, 25 Feb 2015 15:50:19 +0100 Message-ID: References: <20150225133644.GW19745@mwanda> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: Andrew Morton , Vyacheslav Dubeyko , Sougata Santra , Christoph Hellwig , "linux-fsdevel@vger.kernel.org" , kernel-janitors@vger.kernel.org To: Dan Carpenter Return-path: Received: from mail-ob0-f170.google.com ([209.85.214.170]:52605 "EHLO mail-ob0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751497AbbBYOuW (ORCPT ); Wed, 25 Feb 2015 09:50:22 -0500 In-Reply-To: <20150225133644.GW19745@mwanda> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On 25 February 2015 at 14:36, Dan Carpenter wrote: > This doesn't change how the code works, but clearly the curly braces > were intended. > > Signed-off-by: Dan Carpenter > > diff --git a/fs/hfsplus/catalog.c b/fs/hfsplus/catalog.c > index 7892e6f..022974a 100644 > --- a/fs/hfsplus/catalog.c > +++ b/fs/hfsplus/catalog.c > @@ -350,10 +350,11 @@ int hfsplus_delete_cat(u32 cnid, struct inode *dir, struct qstr *str) > &fd.search_key->cat.name.unicode, > off + 2, len); > fd.search_key->key_len = cpu_to_be16(6 + len); > - } else > + } else { > err = hfsplus_cat_build_key(sb, fd.search_key, dir->i_ino, str); > if (unlikely(err)) > goto out; > + } > > err = hfs_brec_find(&fd, hfs_find_rec_by_key); > if (err) Right you are. I would also add 2 things: 1. CC the author of the last patch (the one which introduced it). 2. Unify the way the return code from hfsplus_cat_build_key() is checked. Now it has two flavours: "if (unlikely(err < 0))" and "if (unlikely(err))". The latter is better. If you do so and resubmit, then it is Reviewed-by: Sergei Antonov