summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1996-10-04 22:35:14 +0000
committerMiles Bader <miles@gnu.org>1996-10-04 22:35:14 +0000
commit37b9915f167f539aa39d1660f219375179bd5ea4 (patch)
tree1d2c635553038dc481ccfb47837aa3771206e915
parent5e41ebe25b2058d80c55e1dd7995ba8206612944 (diff)
(S_tioctl_tiocswinsz): Correct test for a changed winsize.
-rw-r--r--term/users.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/term/users.c b/term/users.c
index 0310a6a5..a4583654 100644
--- a/term/users.c
+++ b/term/users.c
@@ -1227,7 +1227,6 @@ S_tioctl_tiocswinsz (io_t port,
return EOPNOTSUPP;
}
-
mutex_lock (&global_lock);
if (!(cred->po->openmodes & (O_READ|O_WRITE)))
@@ -1237,10 +1236,11 @@ S_tioctl_tiocswinsz (io_t port,
ports_port_deref (cred);
- if (!err && (size.ws_row - window_size.ws_row +
- size.ws_col - window_size.ws_col +
- size.ws_xpixel - window_size.ws_xpixel +
- size.ws_ypixel - window_size.ws_ypixel) != 0)
+ if (! err
+ && (size.ws_row != window_size.ws_row
+ || size.ws_col != window_size.ws_col
+ || size.ws_xpixel != window_size.ws_xpixel
+ || size.ws_ypixel != window_size.ws_ypixel))
{
/* The size is actually changing. Record the new size and notify the
process group. */