Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/xinstall add comments noting the mktemp usage is safe.



details:   https://anonhg.NetBSD.org/src/rev/72e2d4d639f0
branches:  trunk
changeset: 518034:72e2d4d639f0
user:      perry <perry%NetBSD.org@localhost>
date:      Fri Nov 23 18:14:51 2001 +0000

description:
add comments noting the mktemp usage is safe.

long run I think we have to abandon using the linker for warnings and
beef up lint instead.

diffstat:

 usr.bin/xinstall/xinstall.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (34 lines):

diff -r afa7e34f7b68 -r 72e2d4d639f0 usr.bin/xinstall/xinstall.c
--- a/usr.bin/xinstall/xinstall.c       Fri Nov 23 17:42:48 2001 +0000
+++ b/usr.bin/xinstall/xinstall.c       Fri Nov 23 18:14:51 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xinstall.c,v 1.61 2001/11/23 16:14:51 simonb Exp $     */
+/*     $NetBSD: xinstall.c,v 1.62 2001/11/23 18:14:51 perry Exp $      */
 
 /*
  * Copyright (c) 1987, 1993
@@ -43,7 +43,7 @@
 #if 0
 static char sccsid[] = "@(#)xinstall.c 8.1 (Berkeley) 7/21/93";
 #else
-__RCSID("$NetBSD: xinstall.c,v 1.61 2001/11/23 16:14:51 simonb Exp $");
+__RCSID("$NetBSD: xinstall.c,v 1.62 2001/11/23 18:14:51 perry Exp $");
 #endif
 #endif /* not lint */
 
@@ -347,6 +347,7 @@
        if (dorename) {
                (void)snprintf(tmpl, sizeof(tmpl), "%s/inst.XXXXXX",
                    xdirname(to_name));
+               /* This usage is safe. The linker will bitch anyway. */
                if (mktemp(tmpl) == NULL)
                        err(1, "%s", tmpl);
                ret = link(from_name, tmpl);
@@ -374,6 +375,7 @@
        if (dorename) {
                (void)snprintf(tmpl, sizeof(tmpl), "%s/inst.XXXXXX",
                    xdirname(to_name));
+               /* This usage is safe. The linker will bitch anyway. */
                if (mktemp(tmpl) == NULL)
                        err(1, "%s", tmpl);
 



Home | Main Index | Thread Index | Old Index