1 From a566a6b11c86147fe9fc9db7ab15f9eecca3e862 Mon Sep 17 00:00:00 2001
2 From: Steven Whitehouse <swhiteho@redhat.com>
3 Date: Mon, 15 Jun 2009 08:26:48 +0100
4 Subject: [PATCH] dlm: Fix uninitialised variable warning in lock.c
6 Content-Type: text/plain; charset=utf-8
7 Content-Transfer-Encoding: 8bit
10 fs/dlm/lock.c: In function ‘find_rsb’:
11 fs/dlm/lock.c:438: warning: ‘r’ may be used uninitialized in this function
13 Since r is used on the error path to set r_ret, set it to NULL.
15 Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
16 Signed-off-by: David Teigland <teigland@redhat.com>
17 Signed-off-by: Coly Li <coly.li@suse.de>
20 1 files changed, 1 insertions(+), 1 deletions(-)
22 diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c
23 index 205ec95..eb507c4 100644
26 @@ -435,7 +435,7 @@ static int search_rsb(struct dlm_ls *ls, char *name, int len, int b,
27 static int find_rsb(struct dlm_ls *ls, char *name, int namelen,
28 unsigned int flags, struct dlm_rsb **r_ret)
30 - struct dlm_rsb *r, *tmp;
31 + struct dlm_rsb *r = NULL, *tmp;
32 uint32_t hash, bucket;