From d57a6a7491045088509807ee435bd58b4855d331 Mon Sep 17 00:00:00 2001 From: Toomas Soome Date: Thu, 14 Jun 2018 14:58:47 +0300 Subject: [PATCH] loader: initialize variables and remove unused ones illumos issue #9605 --- usr/src/boot/lib/libstand/nfs.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/usr/src/boot/lib/libstand/nfs.c b/usr/src/boot/lib/libstand/nfs.c index 1cf8f5af0b..d1a941656f 100644 --- a/usr/src/boot/lib/libstand/nfs.c +++ b/usr/src/boot/lib/libstand/nfs.c @@ -1,6 +1,6 @@ /* $NetBSD: nfs.c,v 1.2 1998/01/24 12:43:09 drochner Exp $ */ -/*- +/* * Copyright (c) 1993 John Brezak * All rights reserved. * @@ -248,7 +248,7 @@ int nfs_lookupfh(struct nfs_iodesc *d, const char *name, struct nfs_iodesc *newfd) { void *pkt = NULL; - int len, rlen, pos; + int len, pos; struct args { uint32_t fhsize; uint32_t fhplusname[1 + @@ -462,27 +462,26 @@ int nfs_open(const char *upath, struct open_file *f) { struct iodesc *desc; - struct nfs_iodesc *currfd; + struct nfs_iodesc *currfd = NULL; char buf[2 * NFS_V3MAXFHSIZE + 3]; u_char *fh; char *cp; int i; - struct nfs_iodesc *newfd; - struct nfsv3_fattrs *fa; + struct nfs_iodesc *newfd = NULL; char *ncp; int c; char namebuf[NFS_MAXPATHLEN + 1]; char linkbuf[NFS_MAXPATHLEN + 1]; int nlinks = 0; int error; - char *path; + char *path = NULL; if (netproto != NET_NFS) return (EINVAL); #ifdef NFS_DEBUG - if (debug) - printf("nfs_open: %s (rootpath=%s)\n", upath, rootpath); + if (debug) + printf("nfs_open: %s (rootpath=%s)\n", upath, rootpath); #endif if (!rootpath[0]) { printf("no rootpath, no nfs\n"); -- 2.11.4.GIT