Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/pkg_install/lib remove clutter left after switching...



details:   https://anonhg.NetBSD.org/src/rev/8a6595187b18
branches:  trunk
changeset: 481605:8a6595187b18
user:      hubertf <hubertf%NetBSD.org@localhost>
date:      Wed Feb 02 14:54:50 2000 +0000

description:
remove clutter left after switching to mkstemp

diffstat:

 usr.sbin/pkg_install/lib/ftpio.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (38 lines):

diff -r b1295dfb423a -r 8a6595187b18 usr.sbin/pkg_install/lib/ftpio.c
--- a/usr.sbin/pkg_install/lib/ftpio.c  Wed Feb 02 14:44:09 2000 +0000
+++ b/usr.sbin/pkg_install/lib/ftpio.c  Wed Feb 02 14:54:50 2000 +0000
@@ -1,8 +1,8 @@
-/*     $NetBSD: ftpio.c,v 1.14 2000/02/02 14:42:53 hubertf Exp $       */
+/*     $NetBSD: ftpio.c,v 1.15 2000/02/02 14:54:50 hubertf Exp $       */
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: ftpio.c,v 1.14 2000/02/02 14:42:53 hubertf Exp $");
+__RCSID("$NetBSD: ftpio.c,v 1.15 2000/02/02 14:54:50 hubertf Exp $");
 #endif
 
 /*
@@ -486,6 +486,7 @@
        if (rc != 226) {
            if (Verbose)
                    warnx("ls failed!");
+           unlink(tmpname);    /* remove clutter */
            return -1;
        }
 
@@ -493,6 +494,7 @@
        rc = ftp_cmd("cd .\n", "\n(550|250).*\n");
        if (rc != 250) {
            warnx("chdir failed!");
+           unlink(tmpname);    /* remove clutter */
            return -1;
        }
        
@@ -505,6 +507,7 @@
                f=fopen(tmpname, "r");
                if (f == NULL) {
                    warn("fopen");
+                   unlink(tmpname);    /* remove clutter */
                    return -1;
                }
                matches=0;



Home | Main Index | Thread Index | Old Index