• B
    nfs: initialize timeout variable in nfs4_proc_setclientid_confirm · 77e03677
    Benny Halevy 提交于
    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: NBenny Halevy <bhalevy@panasas.com>
    Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
    77e03677
nfs4proc.c 99.1 KB