Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Feb 2016 05:15:51 +0000 (UTC)
From:      Garrett Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r295365 - user/ngie/bsnmp_cleanup/contrib/bsnmp/lib
Message-ID:  <201602070515.u175Fp6B026388@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ngie
Date: Sun Feb  7 05:15:51 2016
New Revision: 295365
URL: https://svnweb.freebsd.org/changeset/base/295365

Log:
  Revert r295247
  
  Changing mktemp to mkstemp breaks the bind call because mkstemp
  creates the file. Functionally, there is no difference in mktemp
  vs mkstemp + unlink, except the additional overhead, so revert
  the commit

Modified:
  user/ngie/bsnmp_cleanup/contrib/bsnmp/lib/snmpclient.c

Modified: user/ngie/bsnmp_cleanup/contrib/bsnmp/lib/snmpclient.c
==============================================================================
--- user/ngie/bsnmp_cleanup/contrib/bsnmp/lib/snmpclient.c	Sun Feb  7 04:58:06 2016	(r295364)
+++ user/ngie/bsnmp_cleanup/contrib/bsnmp/lib/snmpclient.c	Sun Feb  7 05:15:51 2016	(r295365)
@@ -1000,7 +1000,7 @@ open_client_local(const char *path)
 	snprintf(snmp_client.local_path, sizeof(snmp_client.local_path),
 	    "%s", SNMP_LOCAL_PATH);
 
-	if (mkstemp(snmp_client.local_path) == -1) {
+	if (mktemp(snmp_client.local_path) == NULL) {
 		seterr(&snmp_client, "%s", strerror(errno));
 		(void)close(snmp_client.fd);
 		snmp_client.fd = -1;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201602070515.u175Fp6B026388>