summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Longeau <chl@cvs.openbsd.org>2010-06-02 20:42:18 +0000
committerCharles Longeau <chl@cvs.openbsd.org>2010-06-02 20:42:18 +0000
commit037159200032c37e75454ae922a390b8c81f1eee (patch)
tree01d05d3a6d72fa82b07bf3ad3ba483548d222b4b
parentfb135151e4144723c9cc22cd966ad48d381e8192 (diff)
fix potential use of uninitialized value, and remove unused variables.
ok deraadt@
-rw-r--r--usr.sbin/config/files.c4
-rw-r--r--usr.sbin/config/mkmakefile.c4
2 files changed, 3 insertions, 5 deletions
diff --git a/usr.sbin/config/files.c b/usr.sbin/config/files.c
index 79700551e4d..b04e3c0b66e 100644
--- a/usr.sbin/config/files.c
+++ b/usr.sbin/config/files.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: files.c,v 1.16 2008/03/22 22:35:15 deraadt Exp $ */
+/* $OpenBSD: files.c,v 1.17 2010/06/02 20:42:17 chl Exp $ */
/* $NetBSD: files.c,v 1.6 1996/03/17 13:18:17 cgd Exp $ */
/*
@@ -102,7 +102,7 @@ addfile(struct nvlist *nvpath, struct nvlist *optx, int flags, const char *rule,
goto bad;
}
if (optx == NULL && (needc || needf)) {
- error("nothing to %s for %s", needc ? "count" : "flag", path);
+ error("nothing to %s", needc ? "count" : "flag");
goto bad;
}
diff --git a/usr.sbin/config/mkmakefile.c b/usr.sbin/config/mkmakefile.c
index 4732dee75ea..67918585d4d 100644
--- a/usr.sbin/config/mkmakefile.c
+++ b/usr.sbin/config/mkmakefile.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mkmakefile.c,v 1.34 2010/05/31 21:56:43 deraadt Exp $ */
+/* $OpenBSD: mkmakefile.c,v 1.35 2010/06/02 20:42:17 chl Exp $ */
/* $NetBSD: mkmakefile.c,v 1.34 1997/02/02 21:12:36 thorpej Exp $ */
/*
@@ -365,10 +365,8 @@ static int
emitfiles(FILE *fp, int suffix)
{
struct files *fi;
- struct config *cf;
int lpos, len, sp;
const char *fpath;
- char swapname[100];
int uppersuffix = toupper(suffix);
if (fprintf(fp, "%cFILES=", uppersuffix) < 0)