summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFederico G. Schwindt <fgsch@cvs.openbsd.org>1999-08-27 08:43:23 +0000
committerFederico G. Schwindt <fgsch@cvs.openbsd.org>1999-08-27 08:43:23 +0000
commit3e798c6c9fb28680366c6bdfa33c43b69f1b77b7 (patch)
tree7c1e9731b4cfb57fe119ed2b2873478652c9fa2a
parent7a6244415a010ad21dc2af48663989a564db4c2f (diff)
Use 10 X's in mkstemp. Replace bcopy with strlcpy.
-rw-r--r--usr.bin/ranlib/misc.c9
-rw-r--r--usr.bin/ranlib/pathnames.h6
-rw-r--r--usr.bin/ranlib/ranlib.16
3 files changed, 11 insertions, 10 deletions
diff --git a/usr.bin/ranlib/misc.c b/usr.bin/ranlib/misc.c
index 01370e93a59..3b64347e2c7 100644
--- a/usr.bin/ranlib/misc.c
+++ b/usr.bin/ranlib/misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: misc.c,v 1.3 1997/01/17 07:13:11 millert Exp $ */
+/* $OpenBSD: misc.c,v 1.4 1999/08/27 08:43:22 fgsch Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
#ifndef lint
/*static char sccsid[] = "from: @(#)misc.c 5.2 (Berkeley) 2/26/91";*/
-static char rcsid[] = "$OpenBSD: misc.c,v 1.3 1997/01/17 07:13:11 millert Exp $";
+static char rcsid[] = "$OpenBSD: misc.c,v 1.4 1999/08/27 08:43:22 fgsch Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -67,9 +67,10 @@ tmp()
}
if (envtmp)
- (void)snprintf(path, MAXPATHLEN, "%s/%s", envtmp, _NAME_RANTMP);
+ (void)snprintf(path, sizeof(path), "%s/%s", envtmp,
+ _NAME_RANTMP);
else
- bcopy(_PATH_RANTMP, path, sizeof(_PATH_RANTMP));
+ strlcpy(path, _PATH_RANTMP, sizeof(path));
sigemptyset(&set);
sigaddset(&set, SIGHUP);
diff --git a/usr.bin/ranlib/pathnames.h b/usr.bin/ranlib/pathnames.h
index 257a7d5c5e2..91ee2bcaabd 100644
--- a/usr.bin/ranlib/pathnames.h
+++ b/usr.bin/ranlib/pathnames.h
@@ -1,4 +1,4 @@
-/* * $OpenBSD: pathnames.h,v 1.2 1996/06/26 05:38:04 deraadt Exp $*/
+/* * $OpenBSD: pathnames.h,v 1.3 1999/08/27 08:43:22 fgsch Exp $*/
/*-
* Copyright (c) 1990 The Regents of the University of California.
* All rights reserved.
@@ -34,5 +34,5 @@
* from: @(#)pathnames.h 5.2 (Berkeley) 4/16/91
*/
-#define _NAME_RANTMP "ranlib.XXXXXX"
-#define _PATH_RANTMP "/tmp/ranlib.XXXXXX"
+#define _NAME_RANTMP "ranlib.XXXXXXXXXX"
+#define _PATH_RANTMP "/tmp/ranlib.XXXXXXXXXX"
diff --git a/usr.bin/ranlib/ranlib.1 b/usr.bin/ranlib/ranlib.1
index d2e48049b3f..f3d4a71dce5 100644
--- a/usr.bin/ranlib/ranlib.1
+++ b/usr.bin/ranlib/ranlib.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ranlib.1,v 1.4 1998/09/27 16:57:50 aaron Exp $
+.\" $OpenBSD: ranlib.1,v 1.5 1999/08/27 08:43:22 fgsch Exp $
.\" Copyright (c) 1990 Regents of the University of California.
.\" All rights reserved.
.\"
@@ -76,8 +76,8 @@ option of
The pathname of the directory to use when creating temporary files.
.El
.Sh FILES
-.Bl -tag -width /tmp/ranlib.XXXXXX -compact
-.It Pa /tmp/ranlib.XXXXXX
+.Bl -tag -width /tmp/ranlib.XXXXXXXXXX -compact
+.It Pa /tmp/ranlib.XXXXXXXXXX
temporary files
.El
.Sh SEE ALSO