diff options
author | ed <ed@FreeBSD.org> | 2009-02-28 14:20:26 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2009-02-28 14:20:26 +0000 |
commit | 51d425ac0e9404969edd449f9538d8d5b5d6541b (patch) | |
tree | 59f30355fa196ac09798c114dc5150840d387ece /sys/kern/tty_info.c | |
parent | b342cbbd7afd2f2831b83817093c7f75c25d4b4d (diff) | |
download | FreeBSD-src-51d425ac0e9404969edd449f9538d8d5b5d6541b.zip FreeBSD-src-51d425ac0e9404969edd449f9538d8d5b5d6541b.tar.gz |
Replace bcopy() calls inside the TTY layer with memcpy()/strlcpy().
In all these cases the buffers never overlap. Program names are also
likely to be shorter, so use a regular strlcpy() to copy p_comm.
Diffstat (limited to 'sys/kern/tty_info.c')
-rw-r--r-- | sys/kern/tty_info.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/tty_info.c b/sys/kern/tty_info.c index d5885b9..fc3a5cf 100644 --- a/sys/kern/tty_info.c +++ b/sys/kern/tty_info.c @@ -299,7 +299,7 @@ tty_info(struct tty *tp) PGRP_UNLOCK(tp->t_pgrp); rufetchcalc(pick, &ru, &utime, &stime); pid = pick->p_pid; - bcopy(pick->p_comm, comm, sizeof(comm)); + strlcpy(comm, pick->p_comm, sizeof comm); PROC_UNLOCK(pick); /* Print command, pid, state, utime, stime, %cpu, and rss. */ |