summaryrefslogtreecommitdiff
path: root/channels.c
diff options
context:
space:
mode:
authormillert@openbsd.org <millert@openbsd.org>2015-02-06 23:21:59 +0000
committerDamien Miller <djm@mindrot.org>2015-02-09 09:28:17 +1100
commitfd36834871d06a03e1ff8d69e41992efa1bbf85f (patch)
tree95390638f8f92dfd017176d558acec1e91a9e3b0 /channels.c
parent1910a286d7771eab84c0b047f31c0a17505236fa (diff)
upstream commit
SIZE_MAX is standard, we should be using it in preference to the obsolete SIZE_T_MAX. OK miod@ beck@
Diffstat (limited to 'channels.c')
-rw-r--r--channels.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/channels.c b/channels.c
index 2fedaf89d..86c454ab5 100644
--- a/channels.c
+++ b/channels.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: channels.c,v 1.340 2015/01/20 23:14:00 deraadt Exp $ */ 1/* $OpenBSD: channels.c,v 1.341 2015/02/06 23:21:59 millert Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -57,12 +57,12 @@
57#include <errno.h> 57#include <errno.h>
58#include <fcntl.h> 58#include <fcntl.h>
59#include <netdb.h> 59#include <netdb.h>
60#include <stdint.h>
60#include <stdio.h> 61#include <stdio.h>
61#include <stdlib.h> 62#include <stdlib.h>
62#include <string.h> 63#include <string.h>
63#include <termios.h> 64#include <termios.h>
64#include <unistd.h> 65#include <unistd.h>
65#include <limits.h>
66#include <stdarg.h> 66#include <stdarg.h>
67 67
68#include "openbsd-compat/sys-queue.h" 68#include "openbsd-compat/sys-queue.h"
@@ -2184,7 +2184,7 @@ channel_prepare_select(fd_set **readsetp, fd_set **writesetp, int *maxfdp,
2184 2184
2185 nfdset = howmany(n+1, NFDBITS); 2185 nfdset = howmany(n+1, NFDBITS);
2186 /* Explicitly test here, because xrealloc isn't always called */ 2186 /* Explicitly test here, because xrealloc isn't always called */
2187 if (nfdset && SIZE_T_MAX / nfdset < sizeof(fd_mask)) 2187 if (nfdset && SIZE_MAX / nfdset < sizeof(fd_mask))
2188 fatal("channel_prepare_select: max_fd (%d) is too large", n); 2188 fatal("channel_prepare_select: max_fd (%d) is too large", n);
2189 sz = nfdset * sizeof(fd_mask); 2189 sz = nfdset * sizeof(fd_mask);
2190 2190