strlcpy (fixed)

This commit is contained in:
itojun 2003-07-15 05:39:28 +00:00
parent 885eddc2ed
commit bd8e1178ee
1 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: job.c,v 1.78 2003/07/15 05:38:24 itojun Exp $ */ /* $NetBSD: job.c,v 1.79 2003/07/15 05:39:28 itojun Exp $ */
/* /*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California. * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@ -39,14 +39,14 @@
*/ */
#ifdef MAKE_BOOTSTRAP #ifdef MAKE_BOOTSTRAP
static char rcsid[] = "$NetBSD: job.c,v 1.78 2003/07/15 05:38:24 itojun Exp $"; static char rcsid[] = "$NetBSD: job.c,v 1.79 2003/07/15 05:39:28 itojun Exp $";
#else #else
#include <sys/cdefs.h> #include <sys/cdefs.h>
#ifndef lint #ifndef lint
#if 0 #if 0
static char sccsid[] = "@(#)job.c 8.2 (Berkeley) 3/19/94"; static char sccsid[] = "@(#)job.c 8.2 (Berkeley) 3/19/94";
#else #else
__RCSID("$NetBSD: job.c,v 1.78 2003/07/15 05:38:24 itojun Exp $"); __RCSID("$NetBSD: job.c,v 1.79 2003/07/15 05:39:28 itojun Exp $");
#endif #endif
#endif /* not lint */ #endif /* not lint */
#endif #endif
@ -1879,7 +1879,7 @@ JobStart(GNode *gn, int flags, Job *previous)
} }
JobSigLock(&mask); JobSigLock(&mask);
(void)strlcpy(tfile, sizeof(tfile), TMPPAT); (void)strlcpy(tfile, TMPPAT, sizeof(tfile));
if ((tfd = mkstemp(tfile)) == -1) if ((tfd = mkstemp(tfile)) == -1)
Punt("Could not create temporary file %s", strerror(errno)); Punt("Could not create temporary file %s", strerror(errno));
(void) eunlink(tfile); (void) eunlink(tfile);