summaryrefslogtreecommitdiffstats
path: root/src/shared/ptyfwd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/ptyfwd.c')
-rw-r--r--src/shared/ptyfwd.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/shared/ptyfwd.c b/src/shared/ptyfwd.c
index 754b4f5a94..4c309f925f 100644
--- a/src/shared/ptyfwd.c
+++ b/src/shared/ptyfwd.c
@@ -646,24 +646,24 @@ int pty_forward_set_width_height(PTYForward *f, unsigned width, unsigned height)
assert(f);
- if (width == (unsigned) -1 && height == (unsigned) -1)
+ if (width == UINT_MAX && height == UINT_MAX)
return 0; /* noop */
- if (width != (unsigned) -1 &&
+ if (width != UINT_MAX &&
(width == 0 || width > USHRT_MAX))
return -ERANGE;
- if (height != (unsigned) -1 &&
+ if (height != UINT_MAX &&
(height == 0 || height > USHRT_MAX))
return -ERANGE;
- if (width == (unsigned) -1 || height == (unsigned) -1) {
+ if (width == UINT_MAX || height == UINT_MAX) {
if (ioctl(f->master, TIOCGWINSZ, &ws) < 0)
return -errno;
- if (width != (unsigned) -1)
+ if (width != UINT_MAX)
ws.ws_col = width;
- if (height != (unsigned) -1)
+ if (height != UINT_MAX)
ws.ws_row = height;
} else
ws = (struct winsize) {