From patchwork Mon Feb 25 22:54:48 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Sandeen X-Patchwork-Id: 2182101 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id AC7E3DFF33 for ; Mon, 25 Feb 2013 21:55:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759744Ab3BYVzb (ORCPT ); Mon, 25 Feb 2013 16:55:31 -0500 Received: from nat-pool-rdu.redhat.com ([66.187.233.202]:20348 "EHLO bp-05.lab.msp.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1759609Ab3BYVzS (ORCPT ); Mon, 25 Feb 2013 16:55:18 -0500 Received: by bp-05.lab.msp.redhat.com (Postfix, from userid 0) id 104691E0A9F; Mon, 25 Feb 2013 16:54:55 -0600 (CST) From: Eric Sandeen To: linux-btrfs@vger.kernel.org Cc: Eric Sandeen Subject: [PATCH 15/17] btrfs-progs: Tidy up resolve_root Date: Mon, 25 Feb 2013 16:54:48 -0600 Message-Id: <1361832890-40921-16-git-send-email-sandeen@redhat.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1361832890-40921-1-git-send-email-sandeen@redhat.com> References: <1361832890-40921-1-git-send-email-sandeen@redhat.com> Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org Whitespace fixes and fix a variable declaration after code. Signed-off-by: Eric Sandeen --- btrfs-list.c | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a/btrfs-list.c b/btrfs-list.c index 8c3f84d..a748d5e 100644 --- a/btrfs-list.c +++ b/btrfs-list.c @@ -564,15 +564,18 @@ static int resolve_root(struct root_lookup *rl, struct root_info *ri, while (1) { char *tmp; u64 next; + int add_len; + /* - * ref_tree = 0 indicates the subvolumes - * has been deleted. - */ + * ref_tree = 0 indicates the subvolumes + * has been deleted. + */ if (!found->ref_tree) { free(full_path); return -ENOENT; } - int add_len = strlen(found->path); + + add_len = strlen(found->path); /* room for / and for null */ tmp = malloc(add_len + 2 + len); @@ -595,7 +598,7 @@ static int resolve_root(struct root_lookup *rl, struct root_info *ri, next = found->ref_tree; - if (next == top_id) { + if (next == top_id) { ri->top_id = top_id; break; }