Subject: Re: minor tweak to kern_kthread.c
To: Gordon W. Ross <gwr@netbsd.org>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: tech-kern
Date: 04/09/1999 10:01:22
On Fri, 9 Apr 1999 00:36:59 -0400
"Gordon W. Ross" <gwr@netbsd.org> wrote:
> Another minor nit...
>
> Should use snprintf here, right?
Yes... didn't originally, because it didn't exist when I wrote that
code :-)
>
> Index: kern_kthread.c
> ===================================================================
> RCS file: /cvsroot/src/sys/kern/kern_kthread.c,v
> retrieving revision 1.3
> diff -c -r1.3 kern_kthread.c
> *** kern_kthread.c 1998/12/22 21:21:36 1.3
> --- kern_kthread.c 1999/04/09 04:35:19
> ***************
> *** 89,95 ****
>
> /* Name it as specified. */
> va_start(ap, fmt);
> ! vsprintf(p2->p_comm, fmt, ap);
> va_end(ap);
>
> /* Arrange for it to start at the specified function. */
> --- 89,95 ----
>
> /* Name it as specified. */
> va_start(ap, fmt);
> ! vsnprintf(p2->p_comm, MAXCOMLEN, fmt, ap);
> va_end(ap);
>
> /* Arrange for it to start at the specified function. */
>
>
>
-- Jason R. Thorpe <thorpej@nas.nasa.gov>