about summary refs log tree commit diff
path: root/include/wctype.h
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011-09-26 18:56:56 -0400
committerRich Felker <dalias@aerifal.cx>2011-09-26 18:56:56 -0400
commit7e14ed1360c65b78c3ad1fc4fafea13e30067478 (patch)
treea8fc0c6d5245613962765857df15aa75acbafc64 /include/wctype.h
parent3bec53e0d3bb5e74d2e2dca34f50aadfaf832607 (diff)
downloadmusl-7e14ed1360c65b78c3ad1fc4fafea13e30067478.tar.gz
musl-7e14ed1360c65b78c3ad1fc4fafea13e30067478.tar.xz
musl-7e14ed1360c65b78c3ad1fc4fafea13e30067478.zip
fix ctype macros to cast argument to (unsigned) first
issue reported by nsz, but it's actually not just pedantic. the
functions can take input of any arithmetic type, including floating
point, and the behavior needs to be as if the conversion implicit in
the function call took place.
Diffstat (limited to 'include/wctype.h')
-rw-r--r--include/wctype.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/wctype.h b/include/wctype.h
index af9be069..3a5af6e7 100644
--- a/include/wctype.h
+++ b/include/wctype.h
@@ -36,7 +36,7 @@ wctrans_t wctrans(const char *);
 wctype_t  wctype(const char *);
 
 #undef iswdigit
-#define iswdigit(a) ((unsigned)((a)-L'0') < 10)
+#define iswdigit(a) (((unsigned)(a)-L'0') < 10)
 
 #ifdef __cplusplus
 }