linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Fabian Frederick <fabf@skynet.be>
To: linux-kernel@vger.kernel.org
Cc: Fabian Frederick <fabf@skynet.be>,
	Artem Bityutskiy <dedekind1@gmail.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	linux-mtd@lists.infradead.org
Subject: [PATCH 6/6 linux-next] ubifs: remove else after return
Date: Fri, 15 May 2015 23:44:00 +0200	[thread overview]
Message-ID: <1431726240-4675-6-git-send-email-fabf@skynet.be> (raw)
In-Reply-To: <1431726240-4675-1-git-send-email-fabf@skynet.be>

simplify code in add_to_lpt_heap()

Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
 fs/ubifs/lprops.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/fs/ubifs/lprops.c b/fs/ubifs/lprops.c
index a0011aa..e1454cf 100644
--- a/fs/ubifs/lprops.c
+++ b/fs/ubifs/lprops.c
@@ -208,13 +208,12 @@ static int add_to_lpt_heap(struct ubifs_info *c, struct ubifs_lprops *lprops,
 		}
 		dbg_check_heap(c, heap, cat, -1);
 		return 0; /* Not added to heap */
-	} else {
-		lprops->hpos = heap->cnt++;
-		heap->arr[lprops->hpos] = lprops;
-		move_up_lpt_heap(c, heap, lprops, cat);
-		dbg_check_heap(c, heap, cat, lprops->hpos);
-		return 1; /* Added to heap */
 	}
+	lprops->hpos = heap->cnt++;
+	heap->arr[lprops->hpos] = lprops;
+	move_up_lpt_heap(c, heap, lprops, cat);
+	dbg_check_heap(c, heap, cat, lprops->hpos);
+	return 1; /* Added to heap */
 }
 
 /**
-- 
2.4.0


  parent reply	other threads:[~2015-05-15 21:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-15 21:43 [PATCH 1/6 linux-next] ubifs: remove unnecessary semi-colon Fabian Frederick
2015-05-15 21:43 ` [PATCH 2/6 linux-next] ubifs: simplify return in shrink_liability() Fabian Frederick
2015-05-15 21:43 ` [PATCH 3/6 linux-next] ubifs: simplify return in layout_cnodes() Fabian Frederick
2015-05-15 21:43 ` [PATCH 4/6 linux-next] ubifs: simplify return in sort_nodes() Fabian Frederick
2015-05-15 21:43 ` [PATCH 5/6 linux-next] ubifs: remove unnecessary else after break Fabian Frederick
2015-05-19 21:45   ` Brian Norris
2015-05-15 21:44 ` Fabian Frederick [this message]
2015-05-18 22:17   ` [PATCH 6/6 linux-next] ubifs: remove else after return Richard Weinberger
2015-05-19 17:42     ` Fabian Frederick
2015-05-19 17:57       ` Richard Weinberger
2015-05-22 21:37         ` Fabian Frederick
2015-05-22 21:46           ` Richard Weinberger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1431726240-4675-6-git-send-email-fabf@skynet.be \
    --to=fabf@skynet.be \
    --cc=adrian.hunter@intel.com \
    --cc=dedekind1@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).