Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern minor nits -- strncpy into p->p_comm



details:   https://anonhg.NetBSD.org/src/rev/c47b4adb8bba
branches:  trunk
changeset: 471803:c47b4adb8bba
user:      gwr <gwr%NetBSD.org@localhost>
date:      Mon Apr 12 00:22:08 1999 +0000

description:
minor nits -- strncpy into p->p_comm

diffstat:

 sys/kern/init_main.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r b00a5f713896 -r c47b4adb8bba sys/kern/init_main.c
--- a/sys/kern/init_main.c      Mon Apr 12 00:11:01 1999 +0000
+++ b/sys/kern/init_main.c      Mon Apr 12 00:22:08 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: init_main.c,v 1.145 1999/04/01 00:22:45 thorpej Exp $  */
+/*     $NetBSD: init_main.c,v 1.146 1999/04/12 00:22:08 gwr Exp $      */
 
 /*
  * Copyright (c) 1995 Christopher G. Demetriou.  All rights reserved.
@@ -246,7 +246,7 @@
        p->p_stat = SRUN;
        p->p_nice = NZERO;
        p->p_emul = &emul_netbsd;
-       memcpy(p->p_comm, "swapper", sizeof("swapper"));
+       strncpy(p->p_comm, "swapper", MAXCOMLEN);
 
        /* Create credentials. */
        cred0.p_refcnt = 1;
@@ -471,6 +471,7 @@
        /*
         * Now in process 1.
         */
+       strncpy(p->p_comm, "init", MAXCOMLEN);
 
        /*
         * This is not the right way to do this.  We really should



Home | Main Index | Thread Index | Old Index