* [Cluster-devel] dlm: Fix uninitialised variable warning in lock.c
@ 2009-06-15 7:26 Steven Whitehouse
0 siblings, 0 replies; only message in thread
From: Steven Whitehouse @ 2009-06-15 7:26 UTC (permalink / raw)
To: cluster-devel.redhat.com
CC [M] fs/dlm/lock.o
fs/dlm/lock.c: In function ?find_rsb?:
fs/dlm/lock.c:438: warning: ?r? may be used uninitialized in this function
Since r is used on the error path to set r_ret, set it to NULL.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c
index 205ec95..eb507c4 100644
--- a/fs/dlm/lock.c
+++ b/fs/dlm/lock.c
@@ -435,7 +435,7 @@ static int search_rsb(struct dlm_ls *ls, char *name, int len, int b,
static int find_rsb(struct dlm_ls *ls, char *name, int namelen,
unsigned int flags, struct dlm_rsb **r_ret)
{
- struct dlm_rsb *r, *tmp;
+ struct dlm_rsb *r = NULL, *tmp;
uint32_t hash, bucket;
int error = -EINVAL;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-06-15 7:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-15 7:26 [Cluster-devel] dlm: Fix uninitialised variable warning in lock.c Steven Whitehouse
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox