summaryrefslogtreecommitdiffstats
path: root/sys/kern/tty_pts.c
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2009-03-01 09:50:13 +0000
committered <ed@FreeBSD.org>2009-03-01 09:50:13 +0000
commit45be9ed4334db5c7016a3cfd17a5bbd1bc8026bc (patch)
tree5bf74c89a3e4610187a85b4c07d97084b105bea9 /sys/kern/tty_pts.c
parent1e29cb8e989182b94c8c02afa8d424cc7c2d5f46 (diff)
downloadFreeBSD-src-45be9ed4334db5c7016a3cfd17a5bbd1bc8026bc.zip
FreeBSD-src-45be9ed4334db5c7016a3cfd17a5bbd1bc8026bc.tar.gz
Improve my previous changes to the TTY code: also remove memcpy().
It's better to just use internal language constructs, because it is likely the compiler has a better opinion on whether to perform inlining, which is very likely to happen to struct winsize. Submitted by: Christoph Mallon <christoph mallon gmx de>
Diffstat (limited to 'sys/kern/tty_pts.c')
-rw-r--r--sys/kern/tty_pts.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/tty_pts.c b/sys/kern/tty_pts.c
index cef9866..74ab185 100644
--- a/sys/kern/tty_pts.c
+++ b/sys/kern/tty_pts.c
@@ -310,7 +310,7 @@ ptsdev_ioctl(struct file *fp, u_long cmd, void *data,
case TIOCGETA:
/* Obtain terminal flags through tcgetattr(). */
tty_lock(tp);
- memcpy(data, &tp->t_termios, sizeof(struct termios));
+ *(struct termios*)data = tp->t_termios;
tty_unlock(tp);
return (0);
#endif /* PTS_LINUX */
OpenPOWER on IntegriCloud