mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
include/ctype.h: fix MISRA R10.2 violation
The value returned by __toupper is used in arithmetic operations causing MISRA C 10.2 violations. Cast to plain char in the toupper macro. Also do the same in tolower for consistency. Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com> Acked-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
1 parent
53dc37829c
commit
21611c6870
1 file changed
+2
-2
@@ -48,7 +48,7 @@ static inline unsigned char __toupper(unsigned char c)
|
||||
return c;
|
||||
}
|
||||
|
||||
#define tolower(c) __tolower(c)
|
||||
#define toupper(c) __toupper(c)
|
||||
#define tolower(c) ((char)__tolower(c))
|
||||
#define toupper(c) ((char)__toupper(c))
|
||||
|
||||
#endif
|
||||