svn commit: r344289 - in stable/11/stand: . efi/loader libsa
Kyle Evans
kevans at FreeBSD.org
Tue Feb 19 18:45:43 UTC 2019
Author: kevans
Date: Tue Feb 19 18:45:40 2019
New Revision: 344289
URL: https://svnweb.freebsd.org/changeset/base/344289
Log:
MFC r335069-r335071, r335110, r335116: stand housecleaning
r335069:
Remove fail: label. It's unused.
r335070:
Remove unused variables.
[kevans@: removed ufs.c modifications; those depend on ufs rewrite bits]
r335071:
Initialize variables we later free so they aren't used
uninitialized in the error path.
Remove unused variables.
r335110:
Remove redundant defs.mk includes. They aren't needed.
r335116:
Use bool for vargood, since it's a boolean.
Modified:
stable/11/stand/efi/loader/main.c
stable/11/stand/ficl.mk
stable/11/stand/libsa/nfs.c
stable/11/stand/libsa/open.c
stable/11/stand/libsa/tftp.c
stable/11/stand/loader.mk
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/stand/efi/loader/main.c
==============================================================================
--- stable/11/stand/efi/loader/main.c Tue Feb 19 18:37:45 2019 (r344288)
+++ stable/11/stand/efi/loader/main.c Tue Feb 19 18:45:40 2019 (r344289)
@@ -415,7 +415,8 @@ main(int argc, CHAR16 *argv[])
{
char var[128];
EFI_GUID *guid;
- int i, j, vargood, howto;
+ int i, j, howto;
+ bool vargood;
UINTN k;
int has_kbd;
char *s;
@@ -532,14 +533,14 @@ main(int argc, CHAR16 *argv[])
}
}
} else {
- vargood = 0;
+ vargood = false;
for (j = 0; argv[i][j] != 0; j++) {
if (j == sizeof(var)) {
- vargood = 0;
+ vargood = false;
break;
}
if (j > 0 && argv[i][j] == '=')
- vargood = 1;
+ vargood = true;
var[j] = (char)argv[i][j];
}
if (vargood) {
Modified: stable/11/stand/ficl.mk
==============================================================================
--- stable/11/stand/ficl.mk Tue Feb 19 18:37:45 2019 (r344288)
+++ stable/11/stand/ficl.mk Tue Feb 19 18:45:40 2019 (r344289)
@@ -2,8 +2,6 @@
# Common flags to build FICL related files
-.include "defs.mk"
-
.if ${MACHINE_CPUARCH} == "amd64" && ${DO32:U0} == 1
FICL_CPUARCH= i386
.elif ${MACHINE_ARCH:Mmips64*} != ""
Modified: stable/11/stand/libsa/nfs.c
==============================================================================
--- stable/11/stand/libsa/nfs.c Tue Feb 19 18:37:45 2019 (r344288)
+++ stable/11/stand/libsa/nfs.c Tue Feb 19 18:45:40 2019 (r344289)
@@ -249,7 +249,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 +
@@ -465,14 +465,13 @@ 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;
#ifndef NFS_NOSYMLINK
- struct nfs_iodesc *newfd;
- struct nfsv3_fattrs *fa;
+ struct nfs_iodesc *newfd = NULL;
char *ncp;
int c;
char namebuf[NFS_MAXPATHLEN + 1];
@@ -480,7 +479,7 @@ nfs_open(const char *upath, struct open_file *f)
int nlinks = 0;
#endif
int error;
- char *path;
+ char *path = NULL;
if (netproto != NET_NFS)
return (EINVAL);
Modified: stable/11/stand/libsa/open.c
==============================================================================
--- stable/11/stand/libsa/open.c Tue Feb 19 18:37:45 2019 (r344288)
+++ stable/11/stand/libsa/open.c Tue Feb 19 18:45:40 2019 (r344289)
@@ -141,7 +141,6 @@ open(const char *fname, int mode)
}
error = besterror;
- fail:
if ((f->f_flags & F_NODEV) == 0 && f->f_dev != NULL)
f->f_dev->dv_close(f);
if (error)
Modified: stable/11/stand/libsa/tftp.c
==============================================================================
--- stable/11/stand/libsa/tftp.c Tue Feb 19 18:37:45 2019 (r344288)
+++ stable/11/stand/libsa/tftp.c Tue Feb 19 18:45:40 2019 (r344289)
@@ -186,7 +186,6 @@ recvtftp(struct iodesc *d, void **pkt, void **payload,
struct tftprecv_extra *extra;
struct tftp_handle *h;
struct tftphdr *t;
- unsigned short *rtype;
void *ptr = NULL;
ssize_t len;
Modified: stable/11/stand/loader.mk
==============================================================================
--- stable/11/stand/loader.mk Tue Feb 19 18:37:45 2019 (r344288)
+++ stable/11/stand/loader.mk Tue Feb 19 18:45:40 2019 (r344289)
@@ -1,7 +1,5 @@
# $FreeBSD$
-.include "defs.mk"
-
.PATH: ${LDRSRC} ${BOOTSRC}/libsa
CFLAGS+=-I${LDRSRC}
More information about the svn-src-all
mailing list