summaryrefslogtreecommitdiff
path: root/usr.bin/talk
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2019-06-28 13:35:06 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2019-06-28 13:35:06 +0000
commit61656abc7ff84215165af1bd464bc053b3b66158 (patch)
treec7eabb0c4fa9faa024e724e99c240c40da07ca42 /usr.bin/talk
parent18603ebf99fbb890ae9666cb0c4aa9f879e7edaa (diff)
When system calls indicate an error they return -1, not some arbitrary
value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
Diffstat (limited to 'usr.bin/talk')
-rw-r--r--usr.bin/talk/init_disp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/talk/init_disp.c b/usr.bin/talk/init_disp.c
index 76dbb7f3865..2f55e99f8dd 100644
--- a/usr.bin/talk/init_disp.c
+++ b/usr.bin/talk/init_disp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: init_disp.c,v 1.22 2016/02/01 07:29:25 mestre Exp $ */
+/* $OpenBSD: init_disp.c,v 1.23 2019/06/28 13:35:04 deraadt Exp $ */
/* $NetBSD: init_disp.c,v 1.6 1994/12/09 02:14:17 jtc Exp $ */
/*
@@ -167,7 +167,7 @@ resize_display(void)
{
struct winsize ws;
- if (ioctl(STDIN_FILENO, TIOCGWINSZ, &ws) < 0 ||
+ if (ioctl(STDIN_FILENO, TIOCGWINSZ, &ws) == -1 ||
(ws.ws_row == LINES && ws.ws_col == COLS))
return;