]>
Commit | Line | Data |
---|---|---|
2cb7cef9 BS |
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 | |
5 | MIME-Version: 1.0 | |
6 | Content-Type: text/plain; charset=utf-8 | |
7 | Content-Transfer-Encoding: 8bit | |
8 | ||
9 | CC [M] fs/dlm/lock.o | |
10 | fs/dlm/lock.c: In function ‘find_rsb’: | |
11 | fs/dlm/lock.c:438: warning: ‘r’ may be used uninitialized in this function | |
12 | ||
13 | Since r is used on the error path to set r_ret, set it to NULL. | |
14 | ||
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> | |
18 | --- | |
19 | fs/dlm/lock.c | 2 +- | |
20 | 1 files changed, 1 insertions(+), 1 deletions(-) | |
21 | ||
22 | diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c | |
23 | index 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 | -- | |
36 | 1.6.0.2 | |
37 |