diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2010-05-24 17:33:03 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-25 11:07:02 -0400 |
commit | 4be929be34f9bdeffa40d815d32d7d60d2c7f03b (patch) | |
tree | 4d2c6e2b8ef766e565e2e050ee151de2e02081d3 /net/ipv4/udp.c | |
parent | 940370fc86b920b51a34217a1facc3e9e97c2456 (diff) |
kernel-wide: replace USHORT_MAX, SHORT_MAX and SHORT_MIN with USHRT_MAX, SHRT_MAX and SHRT_MIN
- C99 knows about USHRT_MAX/SHRT_MAX/SHRT_MIN, not
USHORT_MAX/SHORT_MAX/SHORT_MIN.
- Make SHRT_MIN of type s16, not int, for consistency.
[akpm@linux-foundation.org: fix drivers/dma/timb_dma.c]
[akpm@linux-foundation.org: fix security/keys/keyring.c]
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'net/ipv4/udp.c')
-rw-r--r-- | net/ipv4/udp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 9de6a698f91d..baeec29fe0f1 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
@@ -1686,8 +1686,8 @@ int udp_lib_setsockopt(struct sock *sk, int level, int optname, | |||
1686 | return -ENOPROTOOPT; | 1686 | return -ENOPROTOOPT; |
1687 | if (val != 0 && val < 8) /* Illegal coverage: use default (8) */ | 1687 | if (val != 0 && val < 8) /* Illegal coverage: use default (8) */ |
1688 | val = 8; | 1688 | val = 8; |
1689 | else if (val > USHORT_MAX) | 1689 | else if (val > USHRT_MAX) |
1690 | val = USHORT_MAX; | 1690 | val = USHRT_MAX; |
1691 | up->pcslen = val; | 1691 | up->pcslen = val; |
1692 | up->pcflag |= UDPLITE_SEND_CC; | 1692 | up->pcflag |= UDPLITE_SEND_CC; |
1693 | break; | 1693 | break; |
@@ -1700,8 +1700,8 @@ int udp_lib_setsockopt(struct sock *sk, int level, int optname, | |||
1700 | return -ENOPROTOOPT; | 1700 | return -ENOPROTOOPT; |
1701 | if (val != 0 && val < 8) /* Avoid silly minimal values. */ | 1701 | if (val != 0 && val < 8) /* Avoid silly minimal values. */ |
1702 | val = 8; | 1702 | val = 8; |
1703 | else if (val > USHORT_MAX) | 1703 | else if (val > USHRT_MAX) |
1704 | val = USHORT_MAX; | 1704 | val = USHRT_MAX; |
1705 | up->pcrlen = val; | 1705 | up->pcrlen = val; |
1706 | up->pcflag |= UDPLITE_RECV_CC; | 1706 | up->pcflag |= UDPLITE_RECV_CC; |
1707 | break; | 1707 | break; |