diff options
author | glebius <glebius@FreeBSD.org> | 2004-11-09 18:35:26 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2004-11-09 18:35:26 +0000 |
commit | 9e1a271f2f623e29e59286ae0250b8b712537aaf (patch) | |
tree | 9d4ecde5a13584c88ec3895e02af53d255a8385f /sys/kern/uipc_socket.c | |
parent | 6800ade4c4de83e1a455c95dbd6773c26b767c34 (diff) | |
download | FreeBSD-src-9e1a271f2f623e29e59286ae0250b8b712537aaf.zip FreeBSD-src-9e1a271f2f623e29e59286ae0250b8b712537aaf.tar.gz |
Since sb_timeo type was increased to int, use INT_MAX instead of SHRT_MAX.
This also gives us ability to close PR.
PR: kern/42352
Approved by: julian (mentor)
MFC after: 1 week
Diffstat (limited to 'sys/kern/uipc_socket.c')
-rw-r--r-- | sys/kern/uipc_socket.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 9a2c0e3..e784fe3 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1754,15 +1754,15 @@ sosetopt(so, sopt) goto bad; /* assert(hz > 0); */ - if (tv.tv_sec < 0 || tv.tv_sec > SHRT_MAX / hz || + if (tv.tv_sec < 0 || tv.tv_sec > INT_MAX / hz || tv.tv_usec < 0 || tv.tv_usec >= 1000000) { error = EDOM; goto bad; } /* assert(tick > 0); */ - /* assert(ULONG_MAX - SHRT_MAX >= 1000000); */ + /* assert(ULONG_MAX - INT_MAX >= 1000000); */ val = (u_long)(tv.tv_sec * hz) + tv.tv_usec / tick; - if (val > SHRT_MAX) { + if (val > INT_MAX) { error = EDOM; goto bad; } |