From owner-svn-src-user@freebsd.org Sun Feb 7 05:15:53 2016 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13A4DAA0DCF for ; Sun, 7 Feb 2016 05:15:53 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D89DD15DF; Sun, 7 Feb 2016 05:15:52 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u175FpNb026389; Sun, 7 Feb 2016 05:15:51 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u175Fp6B026388; Sun, 7 Feb 2016 05:15:51 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201602070515.u175Fp6B026388@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 7 Feb 2016 05:15:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r295365 - user/ngie/bsnmp_cleanup/contrib/bsnmp/lib X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Feb 2016 05:15:53 -0000 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;