diff options
Diffstat (limited to 'src/ctype/toupper.c')
| -rw-r--r-- | src/ctype/toupper.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/ctype/toupper.c b/src/ctype/toupper.c index 009fe23a..43cd52fd 100644 --- a/src/ctype/toupper.c +++ b/src/ctype/toupper.c @@ -1,6 +1,3 @@ -#include <stdio.h> -#include <limits.h> -#include <stdio.h> #include "_ctype.h" /** convert a lowercase letter to uppercase **/ @@ -12,11 +9,7 @@ int toupper(int c) SIGNAL_SAFE(0); ASSERT_REPRESENTABLE(c, 0, UCHAR_MAX, unsigned char, EOF); - if (c == EOF) { - return EOF; - } - - return map[c]; + return c == EOF ? EOF : map[c]; } __check_1(int, 0, toupper, int) |
