Yeah yeah I know mkstemp instead of mkstemp ??? we already do strlcpy in
place. But why not DTRT... 

On the same subject of /tmp
As well should we not be attempting to get environ(7) TMPDIR and honor
it throughout all of pkgng ?

Added verbage: (off topic)
Also line 4 & 14 have an extra space after the asterisks(*)


Anyway... nice work on pkgng folks, keep up the AWESOME! work.

-- 

 - (2^(N-1)) JJH48-ARIN

diff --git a/libpkg/update.c b/libpkg/update.c
index 0ede23c..942b6b7 100644
--- a/libpkg/update.c
+++ b/libpkg/update.c
@@ -88,7 +88,7 @@ pkg_update(const char *name, const char *packagesite, bool force)
 	snprintf(url, MAXPATHLEN, "%s/repo.txz", packagesite);
 
 	(void)strlcpy(tmp, "/tmp/repo.txz.XXXXXX", sizeof(tmp));
-	if (mktemp(tmp) == NULL) {
+	if (mkstemp(tmp) == -1) {
 		pkg_emit_error("Could not create temporary file %s, "
 		    "aborting update.\n", tmp);
 		return (EPKG_FATAL);
_______________________________________________
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"

Reply via email to