From d155d0bf6d3c992d5a429c49c4109da069040c35 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Fri, 3 Jul 1998 06:01:21 +0000 Subject: use 10 X in mkstemp string for improved speed at race winning --- bin/ed/buf.c | 6 +++--- bin/pax/tables.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bin/ed/buf.c b/bin/ed/buf.c index 6f170c575df..878c89423ff 100644 --- a/bin/ed/buf.c +++ b/bin/ed/buf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: buf.c,v 1.8 1998/04/30 05:55:04 deraadt Exp $ */ +/* $OpenBSD: buf.c,v 1.9 1998/07/03 06:01:17 deraadt Exp $ */ /* $NetBSD: buf.c,v 1.15 1995/04/23 10:07:28 cgd Exp $ */ /* buf.c: This file contains the scratch-file buffer rountines for the @@ -33,7 +33,7 @@ #if 0 static char *rcsid = "@(#)buf.c,v 1.4 1994/02/01 00:34:35 alm Exp"; #else -static char rcsid[] = "$OpenBSD: buf.c,v 1.8 1998/04/30 05:55:04 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: buf.c,v 1.9 1998/07/03 06:01:17 deraadt Exp $"; #endif #endif /* not lint */ @@ -208,7 +208,7 @@ open_sbuf() int fd = -1; isbinary = newline_added = 0; - strcpy(sfn, "/tmp/ed.XXXXXX"); + strcpy(sfn, "/tmp/ed.XXXXXXXXXX"); if ((fd = mkstemp(sfn)) == -1 || (sfp = fdopen(fd, "w+")) == NULL) { if (fd != -1) diff --git a/bin/pax/tables.c b/bin/pax/tables.c index 51221d159be..1f36fb4f28e 100644 --- a/bin/pax/tables.c +++ b/bin/pax/tables.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tables.c,v 1.9 1997/09/01 18:30:00 deraadt Exp $ */ +/* $OpenBSD: tables.c,v 1.10 1998/07/03 06:01:20 deraadt Exp $ */ /* $NetBSD: tables.c,v 1.4 1995/03/21 09:07:45 cgd Exp $ */ /*- @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = "@(#)tables.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$OpenBSD: tables.c,v 1.9 1997/09/01 18:30:00 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: tables.c,v 1.10 1998/07/03 06:01:20 deraadt Exp $"; #endif #endif /* not lint */ @@ -377,7 +377,7 @@ ftime_start() * get random name and create temporary scratch file, unlink name * so it will get removed on exit */ - pt = strdup("/tmp/paxXXXXXX"); + pt = strdup("/tmp/paxXXXXXXXXXX"); if ((ffd = mkstemp(pt)) < 0) { syswarn(1, errno, "Unable to create temporary file: %s", pt); free(pt); @@ -1222,7 +1222,7 @@ dir_start() /* * unlink the file so it goes away at termination by itself */ - pt = strdup("/tmp/paxXXXXXX"); + pt = strdup("/tmp/paxXXXXXXXXXX"); if ((dirfd = mkstemp(pt)) >= 0) { (void)unlink(pt); free(pt); -- cgit v1.2.3