9
0
Fork 0

linux/kernel.h: rename USHORT_MAX, SHORT_MAX, SHORT_MIN

Linux uses SHRT_* instead of SHORT_*.  The <limits.h> of C does
the same.  Let's follow this standard.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Masahiro Yamada 2015-01-21 14:09:18 +09:00 committed by Sascha Hauer
parent 2ce9068d85
commit d27077bd76
2 changed files with 4 additions and 4 deletions

View File

@ -26,7 +26,7 @@ again:
}
v = simple_strtoul(start + optlen + 1, &endp, 0);
if (v > USHORT_MAX)
if (v > USHRT_MAX)
return;
if (*endp == ',' || *endp == '\0')

View File

@ -4,9 +4,9 @@
#include <linux/compiler.h>
#include <linux/barebox-wrapper.h>
#define USHORT_MAX ((u16)(~0U))
#define SHORT_MAX ((s16)(USHORT_MAX>>1))
#define SHORT_MIN (-SHORT_MAX - 1)
#define USHRT_MAX ((u16)(~0U))
#define SHRT_MAX ((s16)(USHRT_MAX>>1))
#define SHRT_MIN ((s16)(-SHRT_MAX - 1))
#define INT_MAX ((int)(~0U>>1))
#define INT_MIN (-INT_MAX - 1)
#define UINT_MAX (~0U)