Adjust previous; apb@ points out that _PATH_TMP is provided by compat_defs.h;

thus, this shouldn't need a paranoid fallback definition.
And, use _PATH_TMP also in the second place that was using a hardwired "/tmp".
This commit is contained in:
dholland 2008-10-16 05:41:13 +00:00
parent 36c1b19ba1
commit 3b398d5c25
1 changed files with 2 additions and 7 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: main.c,v 1.30 2008/10/16 05:35:01 dholland Exp $ */
/* $NetBSD: main.c,v 1.31 2008/10/16 05:41:13 dholland Exp $ */
/*
* Copyright (c) 1992, 1993
@ -80,11 +80,6 @@ COPYRIGHT("@(#) Copyright (c) 1992, 1993\
#define LINE_MAX 1024
#endif
/* just in case */
#ifndef _PATH_TMP
#define _PATH_TMP "/tmp"
#endif
int vflag; /* verbose output */
int Pflag; /* pack locators */
int Lflag; /* lint config generation */
@ -1262,7 +1257,7 @@ logconfig_start(void)
tmpdir = getenv("TMPDIR");
if (tmpdir == NULL)
tmpdir = "/tmp";
tmpdir = _PATH_TMP;
(void)snprintf(line, sizeof(line), "%s/config.tmp.XXXXXX", tmpdir);
if ((fd = mkstemp(line)) == -1 ||
(cfg = fdopen(fd, "r+")) == NULL) {