changeset 18850:4ba45ee33896

loader: initialize variables and remove unused ones illumos issue #9605
author Toomas Soome <tsoome@me.com>
date Thu, 14 Jun 2018 14:58:47 +0300
parents 0213e821a0cd
children caa88f9faf07
files usr/src/boot/lib/libstand/nfs.c
diffstat 1 files changed, 7 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/boot/lib/libstand/nfs.c	Mon Jul 16 15:07:24 2018 +0300
+++ b/usr/src/boot/lib/libstand/nfs.c	Thu Jun 14 14:58:47 2018 +0300
@@ -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 @@
 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 @@
 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");