summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorrillig <rillig>2007-11-01 23:08:29 +0000
committerrillig <rillig>2007-11-01 23:08:29 +0000
commit5d8f357dbd15bb7181accf18c2c26b9f17844a3f (patch)
tree9fdba7930ad7d958fda0d273f6939fd727ddc2ee /pkgtools
parent12af70e437e3dfb14630f6e57f15a67c663ca42e (diff)
downloadpkgsrc-5d8f357dbd15bb7181accf18c2c26b9f17844a3f.tar.gz
Added quotes around the filenames, as suggested by joerg@.
While here, removed an unnecessary variable.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkg_install/files/add/perform.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/pkgtools/pkg_install/files/add/perform.c b/pkgtools/pkg_install/files/add/perform.c
index 452b6543a45..76243074801 100644
--- a/pkgtools/pkg_install/files/add/perform.c
+++ b/pkgtools/pkg_install/files/add/perform.c
@@ -1,4 +1,4 @@
-/* $NetBSD: perform.c,v 1.64 2007/11/01 21:57:37 rillig Exp $ */
+/* $NetBSD: perform.c,v 1.65 2007/11/01 23:08:29 rillig Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -14,7 +14,7 @@
#if 0
static const char *rcsid = "from FreeBSD Id: perform.c,v 1.44 1997/10/13 15:03:46 jkh Exp";
#else
-__RCSID("$NetBSD: perform.c,v 1.64 2007/11/01 21:57:37 rillig Exp $");
+__RCSID("$NetBSD: perform.c,v 1.65 2007/11/01 23:08:29 rillig Exp $");
#endif
#endif
@@ -357,7 +357,7 @@ ignore_replace_depends_check:
if (Verbose)
printf("mv %s %s\n", replace_from, replace_via);
if (rename(replace_from, replace_via) != 0)
- err(EXIT_FAILURE, "renaming %s to %s failed", replace_from, replace_via);
+ err(EXIT_FAILURE, "renaming \"%s\" to \"%s\" failed", replace_from, replace_via);
*replacing = 1;
}
@@ -393,7 +393,6 @@ pkg_do(const char *pkg, lpkg_head_t *pkgs)
plist_t *p;
struct stat sb;
struct utsname host_uname;
- int rc;
uint64_t needed;
Boolean is_depoted_pkg = FALSE;
lfile_t *lfp;
@@ -982,9 +981,8 @@ success:
* Upgrade step 3/4: move back +REQUIRED_BY file
* (see also step 2/4)
*/
- rc = rename(replace_via, replace_to);
- if (rc != 0)
- err(EXIT_FAILURE, "renaming %s to %s failed", replace_via, replace_to);
+ if (rename(replace_via, replace_to) != 0)
+ err(EXIT_FAILURE, "renaming \"%s\" to \"%s\" failed", replace_via, replace_to);
/*
* Upgrade step 4/4: Fix pkgs that depend on us to