This is the mail archive of the cluster-cvs@sourceware.org mailing list for the cluster.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gfs2-utils: master - Get rid of build warning in gfs2_convert.


Gitweb:        http://git.fedorahosted.org/git/gfs2-utils.git?p=gfs2-utils.git;a=commitdiff;h=157c9668abbe8bac268c929238922dce17b74f34
Commit:        157c9668abbe8bac268c929238922dce17b74f34
Parent:        91c3e9a69ed70d3d522f5b47015da5e5868722ec
Author:        Bob Peterson <rpeterso@redhat.com>
AuthorDate:    Tue Jan 27 09:29:36 2009 -0600
Committer:     Bob Peterson <rpeterso@redhat.com>
CommitterDate: Tue Jan 27 09:31:24 2009 -0600

Get rid of build warning in gfs2_convert.

---
 gfs2/convert/gfs2_convert.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/gfs2/convert/gfs2_convert.c b/gfs2/convert/gfs2_convert.c
index 5e396a5..98b8c2b 100644
--- a/gfs2/convert/gfs2_convert.c
+++ b/gfs2/convert/gfs2_convert.c
@@ -242,7 +242,7 @@ struct gfs2_buffer_head *find_lbh(struct gfs2_sbd *sbp,
 {
 	struct gfs2_buffer_head *bh;
 	osi_list_t *head, *tmp;
-	struct blocklist *blk;
+	struct blocklist *blk = NULL;
 
 	head = &blist->list;
 
@@ -253,6 +253,10 @@ struct gfs2_buffer_head *find_lbh(struct gfs2_sbd *sbp,
 			return bh;
 		}
 	}
+	/* If there's no first entry, just return NULL.  Otherwise blk
+	   should be left as the last entry on the list. */
+	if (!blk)
+		return NULL;
 	/* We didn't find one that has the same offset, so let's just reuse
 	   a bh from the same height */
 	blk->lbparent = lblock;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]