aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/tty_compat.c
diff options
context:
space:
mode:
authorBrooks Davis <brooks@FreeBSD.org>2018-03-12 23:04:42 +0000
committerBrooks Davis <brooks@FreeBSD.org>2018-03-12 23:04:42 +0000
commit467e627672eaddc88a6121f809313d8451422f4e (patch)
treed1bd22dce8c04f91d91277b52ec4debc761eb28c /sys/kern/tty_compat.c
parent405b67a225a8cbcd2c856c2034a025bc362c7477 (diff)
downloadsrc-467e627672eaddc88a6121f809313d8451422f4e.tar.gz
src-467e627672eaddc88a6121f809313d8451422f4e.zip
Notes
Diffstat (limited to 'sys/kern/tty_compat.c')
-rw-r--r--sys/kern/tty_compat.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/kern/tty_compat.c b/sys/kern/tty_compat.c
index 8a4545c64e3f..b61e05859f93 100644
--- a/sys/kern/tty_compat.c
+++ b/sys/kern/tty_compat.c
@@ -262,9 +262,11 @@ tty_ioctl_compat(struct tty *tp, u_long com, caddr_t data, int fflag,
fflag, td));
}
- case OTIOCCONS:
- *(int *)data = 1;
- return (tty_ioctl(tp, TIOCCONS, data, fflag, td));
+ case OTIOCCONS: {
+ int one = 1;
+
+ return (tty_ioctl(tp, TIOCCONS, (caddr_t)&one, fflag, td));
+ }
default:
return (ENOIOCTL);