Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/gnu/usr.bin/groff/indxbib Use mkstemp(3).



details:   https://anonhg.NetBSD.org/src/rev/0088c9fff068
branches:  trunk
changeset: 481166:0088c9fff068
user:      mycroft <mycroft%NetBSD.org@localhost>
date:      Mon Jan 24 02:03:37 2000 +0000

description:
Use mkstemp(3).

diffstat:

 gnu/usr.bin/groff/indxbib/indxbib.cc |  4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diffs (15 lines):

diff -r d484338c3546 -r 0088c9fff068 gnu/usr.bin/groff/indxbib/indxbib.cc
--- a/gnu/usr.bin/groff/indxbib/indxbib.cc      Mon Jan 24 02:00:50 2000 +0000
+++ b/gnu/usr.bin/groff/indxbib/indxbib.cc      Mon Jan 24 02:03:37 2000 +0000
@@ -219,10 +219,8 @@
   else {
     temp_index_file = strsave(TEMP_INDEX_TEMPLATE);
   }
-  if (!mktemp(temp_index_file) || !temp_index_file[0])
-    fatal("cannot create file name for temporary file");
   catch_fatal_signals();
-  int fd = creat(temp_index_file, S_IRUSR|S_IRGRP|S_IROTH);
+  int fd = mkstemp(temp_index_file);
   if (fd < 0)
     fatal("can't create temporary index file: %1", strerror(errno));
   indxfp = fdopen(fd, "w");



Home | Main Index | Thread Index | Old Index