summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr.bin/xinstall/Makefile1
-rw-r--r--usr.bin/xinstall/xinstall.c2
2 files changed, 3 insertions, 0 deletions
diff --git a/usr.bin/xinstall/Makefile b/usr.bin/xinstall/Makefile
index e6ff88e..594f1dc 100644
--- a/usr.bin/xinstall/Makefile
+++ b/usr.bin/xinstall/Makefile
@@ -4,5 +4,6 @@
PROG= xinstall
PROGNAME= install
MAN= install.1
+WARNS?= 6
.include <bsd.prog.mk>
diff --git a/usr.bin/xinstall/xinstall.c b/usr.bin/xinstall/xinstall.c
index 441c108..58cdcca 100644
--- a/usr.bin/xinstall/xinstall.c
+++ b/usr.bin/xinstall/xinstall.c
@@ -270,6 +270,8 @@ install(const char *from_name, const char *to_name, u_long fset, u_int flags)
char backup[MAXPATHLEN], *p, pathbuf[MAXPATHLEN], tempfile[MAXPATHLEN];
files_match = 0;
+ from_fd = -1;
+ to_fd = -1;
/* If try to install NULL file to a directory, fails. */
if (flags & DIRECTORY || strcmp(from_name, _PATH_DEVNULL)) {
OpenPOWER on IntegriCloud