]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/suse-2.6.27.39/patches.fixes/dlm-Fix-uninitialised-variable-warning-in-lock.c.patch
Imported linux-2.6.27.39 suse/xen patches.
[ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.fixes / dlm-Fix-uninitialised-variable-warning-in-lock.c.patch
CommitLineData
2cb7cef9
BS
1From a566a6b11c86147fe9fc9db7ab15f9eecca3e862 Mon Sep 17 00:00:00 2001
2From: Steven Whitehouse <swhiteho@redhat.com>
3Date: Mon, 15 Jun 2009 08:26:48 +0100
4Subject: [PATCH] dlm: Fix uninitialised variable warning in lock.c
5MIME-Version: 1.0
6Content-Type: text/plain; charset=utf-8
7Content-Transfer-Encoding: 8bit
8
9 CC [M] fs/dlm/lock.o
10fs/dlm/lock.c: In function ‘find_rsb’:
11fs/dlm/lock.c:438: warning: ‘r’ may be used uninitialized in this function
12
13Since r is used on the error path to set r_ret, set it to NULL.
14
15Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
16Signed-off-by: David Teigland <teigland@redhat.com>
17Signed-off-by: Coly Li <coly.li@suse.de>
18---
19 fs/dlm/lock.c | 2 +-
20 1 files changed, 1 insertions(+), 1 deletions(-)
21
22diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c
23index 205ec95..eb507c4 100644
24--- a/fs/dlm/lock.c
25+++ b/fs/dlm/lock.c
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)
29 {
30- struct dlm_rsb *r, *tmp;
31+ struct dlm_rsb *r = NULL, *tmp;
32 uint32_t hash, bucket;
33 int error = -EINVAL;
34
35--
361.6.0.2
37