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>
This commit is contained in:
committed by
Linus Torvalds
parent
940370fc86
commit
4be929be34
@@ -998,7 +998,7 @@ static ssize_t __write_ports_addxprt(char *buf)
|
||||
if (sscanf(buf, "%15s %4u", transport, &port) != 2)
|
||||
return -EINVAL;
|
||||
|
||||
if (port < 1 || port > USHORT_MAX)
|
||||
if (port < 1 || port > USHRT_MAX)
|
||||
return -EINVAL;
|
||||
|
||||
err = nfsd_create_serv();
|
||||
@@ -1040,7 +1040,7 @@ static ssize_t __write_ports_delxprt(char *buf)
|
||||
if (sscanf(&buf[1], "%15s %4u", transport, &port) != 2)
|
||||
return -EINVAL;
|
||||
|
||||
if (port < 1 || port > USHORT_MAX || nfsd_serv == NULL)
|
||||
if (port < 1 || port > USHRT_MAX || nfsd_serv == NULL)
|
||||
return -EINVAL;
|
||||
|
||||
xprt = svc_find_xprt(nfsd_serv, transport, AF_UNSPEC, port);
|
||||
|
Reference in New Issue
Block a user