Initialize variables we later free so they aren't used
uninitialized in the error path. Remove unused variables. Sponsored by: Netflix
This commit is contained in:
parent
6d423eb2cb
commit
46c0e42b6e
@ -249,7 +249,7 @@ int
|
|||||||
nfs_lookupfh(struct nfs_iodesc *d, const char *name, struct nfs_iodesc *newfd)
|
nfs_lookupfh(struct nfs_iodesc *d, const char *name, struct nfs_iodesc *newfd)
|
||||||
{
|
{
|
||||||
void *pkt = NULL;
|
void *pkt = NULL;
|
||||||
int len, rlen, pos;
|
int len, pos;
|
||||||
struct args {
|
struct args {
|
||||||
uint32_t fhsize;
|
uint32_t fhsize;
|
||||||
uint32_t fhplusname[1 +
|
uint32_t fhplusname[1 +
|
||||||
@ -465,14 +465,13 @@ int
|
|||||||
nfs_open(const char *upath, struct open_file *f)
|
nfs_open(const char *upath, struct open_file *f)
|
||||||
{
|
{
|
||||||
struct iodesc *desc;
|
struct iodesc *desc;
|
||||||
struct nfs_iodesc *currfd;
|
struct nfs_iodesc *currfd = NULL;
|
||||||
char buf[2 * NFS_V3MAXFHSIZE + 3];
|
char buf[2 * NFS_V3MAXFHSIZE + 3];
|
||||||
u_char *fh;
|
u_char *fh;
|
||||||
char *cp;
|
char *cp;
|
||||||
int i;
|
int i;
|
||||||
#ifndef NFS_NOSYMLINK
|
#ifndef NFS_NOSYMLINK
|
||||||
struct nfs_iodesc *newfd;
|
struct nfs_iodesc *newfd = NULL;
|
||||||
struct nfsv3_fattrs *fa;
|
|
||||||
char *ncp;
|
char *ncp;
|
||||||
int c;
|
int c;
|
||||||
char namebuf[NFS_MAXPATHLEN + 1];
|
char namebuf[NFS_MAXPATHLEN + 1];
|
||||||
@ -480,7 +479,7 @@ nfs_open(const char *upath, struct open_file *f)
|
|||||||
int nlinks = 0;
|
int nlinks = 0;
|
||||||
#endif
|
#endif
|
||||||
int error;
|
int error;
|
||||||
char *path;
|
char *path = NULL;
|
||||||
|
|
||||||
if (netproto != NET_NFS)
|
if (netproto != NET_NFS)
|
||||||
return (EINVAL);
|
return (EINVAL);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user