summaryrefslogtreecommitdiff
path: root/lib/libc/gen/toupper_.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2002-12-13 22:39:28 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2002-12-13 22:39:28 +0000
commitbfbc7da39f42692e8c915b69f2cd699f7bc26ec6 (patch)
tree97af1f452a8593d41a5fefc0bdba16d462e59afd /lib/libc/gen/toupper_.c
parent12fda537764f942d164b05b98e243714ff03ca51 (diff)
Cast to unsigned int, not unsigned char, since what is being cast is an
int, not a char.
Diffstat (limited to 'lib/libc/gen/toupper_.c')
-rw-r--r--lib/libc/gen/toupper_.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/gen/toupper_.c b/lib/libc/gen/toupper_.c
index b6ab3090006..d5e9b98dcf7 100644
--- a/lib/libc/gen/toupper_.c
+++ b/lib/libc/gen/toupper_.c
@@ -4,7 +4,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: toupper_.c,v 1.4 2002/12/11 23:01:40 millert Exp $";
+static char rcsid[] = "$OpenBSD: toupper_.c,v 1.5 2002/12/13 22:39:27 millert Exp $";
#endif /* LIBC_SCCS and not lint */
#define _ANSI_LIBRARY
@@ -54,7 +54,7 @@ int
toupper(c)
int c;
{
- if (c != (unsigned char) c)
+ if (c != (c & 0177))
return(c);
return((_toupper_tab_ + 1)[c]);
}