diff options
| author | Jakob Kaivo <jkk@ung.org> | 2024-01-31 17:15:10 -0500 |
|---|---|---|
| committer | Jakob Kaivo <jkk@ung.org> | 2024-01-31 17:15:10 -0500 |
| commit | c3e4cda23b025d80a001a20758a907964a220361 (patch) | |
| tree | 0587ca957483c6f3c6a1addf7e8aab321bfd572e /src/ctype/toupper.c | |
| parent | 240d3bdd77d36b8295e2ba8a34c80bb1baafaf6e (diff) | |
clean up headers
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) |
