[PATCH 1/2] cclass: char is wide enough

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The table for character classes is declared as 'long cclass[]'
but there is no more reasons for such a wide type, 'int', or even
'char' is enough here.

Change this to use 'char' instead of 'long'.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
---
 tokenize.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tokenize.c b/tokenize.c
index 99b958035..7e68cf1ee 100644
--- a/tokenize.c
+++ b/tokenize.c
@@ -483,7 +483,7 @@ enum {
 	Quote = 64,
 };
 
-static const long cclass[257] = {
+static const char cclass[257] = {
 	['0' + 1 ... '7' + 1] = Digit | Hex,	/* \<octal> */
 	['8' + 1 ... '9' + 1] = Digit | Hex,
 	['A' + 1 ... 'D' + 1] = Letter | Hex,
-- 
2.14.0

--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux