aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorBenny Halevy <bhalevy@panasas.com>2008-06-24 13:25:57 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2008-07-09 12:09:30 -0400
commit77e03677ac76d413fbb6d6caaffa1d64877a0c2a (patch)
tree7e89420de054284c5cb26896c52a3818598c642b /fs/nfs
parentd8e7748ab8322171ebfd78f6155ff35e7d57ac32 (diff)
nfs: initialize timeout variable in nfs4_proc_setclientid_confirm
gcc (4.3.0) rightfully warns about this: /usr0/export/dev/bhalevy/git/linux-pnfs-bh-nfs41/fs/nfs/nfs4proc.c: In function ‘nfs4_proc_setclientid_confirm’: /usr0/export/dev/bhalevy/git/linux-pnfs-bh-nfs41/fs/nfs/nfs4proc.c:2936: warning: ‘timeout’ may be used uninitialized in this function nfs4_delay that's passed a pointer to 'timeout' is looking at its value and sets it up to some value in the range: NFS4_POLL_RETRY_MIN..NFS4_POLL_RETRY_MAX if (*timeout <= 0) *timeout = NFS4_POLL_RETRY_MIN; if (*timeout > NFS4_POLL_RETRY_MAX) *timeout = NFS4_POLL_RETRY_MAX; Therefore it will end up set to some sane, though rather indeterministic, value. Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/nfs4proc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 10f01c05a4e4..4451287a81d1 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -2924,7 +2924,7 @@ static int _nfs4_proc_setclientid_confirm(struct nfs_client *clp, struct rpc_cre
2924 2924
2925int nfs4_proc_setclientid_confirm(struct nfs_client *clp, struct rpc_cred *cred) 2925int nfs4_proc_setclientid_confirm(struct nfs_client *clp, struct rpc_cred *cred)
2926{ 2926{
2927 long timeout; 2927 long timeout = 0;
2928 int err; 2928 int err;
2929 do { 2929 do {
2930 err = _nfs4_proc_setclientid_confirm(clp, cred); 2930 err = _nfs4_proc_setclientid_confirm(clp, cred);